GH-90699: Move generated static initializer to pycore_runtime_generated.h (GH-94051)

This commit is contained in:
Kumar Aditya 2022-07-08 01:34:05 +05:30 committed by GitHub
parent afd6a37ad1
commit 71697664d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1170 additions and 1150 deletions

47
.gitattributes vendored
View File

@ -62,26 +62,27 @@ PCbuild/readme.txt dos
# #
[attr]generated linguist-generated=true diff=generated [attr]generated linguist-generated=true diff=generated
**/clinic/*.c.h generated **/clinic/*.c.h generated
*_db.h generated *_db.h generated
Doc/data/stable_abi.dat generated Doc/data/stable_abi.dat generated
Doc/library/token-list.inc generated Doc/library/token-list.inc generated
Include/internal/pycore_ast.h generated Include/internal/pycore_ast.h generated
Include/internal/pycore_ast_state.h generated Include/internal/pycore_ast_state.h generated
Include/internal/pycore_opcode.h generated Include/internal/pycore_opcode.h generated
Include/opcode.h generated Include/internal/pycore_runtime_init_generated.h generated
Include/token.h generated Include/opcode.h generated
Lib/keyword.py generated Include/token.h generated
Lib/test/test_stable_abi_ctypes.py generated Lib/keyword.py generated
Lib/token.py generated Lib/test/test_stable_abi_ctypes.py generated
Objects/typeslots.inc generated Lib/token.py generated
PC/python3dll.c generated Objects/typeslots.inc generated
Parser/parser.c generated PC/python3dll.c generated
Parser/token.c generated Parser/parser.c generated
Programs/test_frozenmain.h generated Parser/token.c generated
Python/Python-ast.c generated Programs/test_frozenmain.h generated
Python/opcode_targets.h generated Python/Python-ast.c generated
Python/stdlib_module_names.h generated Python/opcode_targets.h generated
Tools/peg_generator/pegen/grammar_parser.py generated Python/stdlib_module_names.h generated
aclocal.m4 generated Tools/peg_generator/pegen/grammar_parser.py generated
configure generated aclocal.m4 generated
configure generated

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1639,6 +1639,7 @@ PYTHON_HEADERS= \
$(srcdir)/Include/internal/pycore_pystate.h \ $(srcdir)/Include/internal/pycore_pystate.h \
$(srcdir)/Include/internal/pycore_range.h \ $(srcdir)/Include/internal/pycore_range.h \
$(srcdir)/Include/internal/pycore_runtime.h \ $(srcdir)/Include/internal/pycore_runtime.h \
$(srcdir)/Include/internal/pycore_runtime_init_generated.h \
$(srcdir)/Include/internal/pycore_runtime_init.h \ $(srcdir)/Include/internal/pycore_runtime_init.h \
$(srcdir)/Include/internal/pycore_signal.h \ $(srcdir)/Include/internal/pycore_signal.h \
$(srcdir)/Include/internal/pycore_sliceobject.h \ $(srcdir)/Include/internal/pycore_sliceobject.h \

View File

@ -241,6 +241,7 @@
<ClInclude Include="..\Include\internal\pycore_range.h" /> <ClInclude Include="..\Include\internal\pycore_range.h" />
<ClInclude Include="..\Include\internal\pycore_runtime.h" /> <ClInclude Include="..\Include\internal\pycore_runtime.h" />
<ClInclude Include="..\Include\internal\pycore_runtime_init.h" /> <ClInclude Include="..\Include\internal\pycore_runtime_init.h" />
<ClInclude Include="..\Include\internal\pycore_runtime_init_generated.h" />
<ClInclude Include="..\Include\internal\pycore_signal.h" /> <ClInclude Include="..\Include\internal\pycore_signal.h" />
<ClInclude Include="..\Include\internal\pycore_sliceobject.h" /> <ClInclude Include="..\Include\internal\pycore_sliceobject.h" />
<ClInclude Include="..\Include\internal\pycore_strhex.h" /> <ClInclude Include="..\Include\internal\pycore_strhex.h" />

View File

@ -533,7 +533,7 @@
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\internal\pycore_descrobject.h"> <ClInclude Include="..\Include\internal\pycore_descrobject.h">
<Filter>Include\internal</Filter> <Filter>Include\internal</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\internal\pycore_dtoa.h"> <ClInclude Include="..\Include\internal\pycore_dtoa.h">
<Filter>Include\internal</Filter> <Filter>Include\internal</Filter>
</ClInclude> </ClInclude>
@ -627,6 +627,9 @@
<ClInclude Include="..\Include\internal\pycore_runtime_init.h"> <ClInclude Include="..\Include\internal\pycore_runtime_init.h">
<Filter>Include\internal</Filter> <Filter>Include\internal</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\Include\internal\pycore_runtime_init_generated.h">
<Filter>Include\internal</Filter>
</ClInclude>
<ClInclude Include="..\Include\internal\pycore_signal.h"> <ClInclude Include="..\Include\internal\pycore_signal.h">
<Filter>Include\internal</Filter> <Filter>Include\internal</Filter>
</ClInclude> </ClInclude>

View File

@ -237,7 +237,7 @@ def generate_runtime_init(identifiers, strings):
assert nsmallposints and nsmallnegints assert nsmallposints and nsmallnegints
# Then target the runtime initializer. # Then target the runtime initializer.
filename = os.path.join(INTERNAL, 'pycore_runtime_init.h') filename = os.path.join(INTERNAL, 'pycore_runtime_init_generated.h')
# Read the non-generated part of the file. # Read the non-generated part of the file.
with open(filename) as infile: with open(filename) as infile: