]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-105481: move Python/opcode_metadata.h to Include/internal/pycore_opcode_metadata...
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Wed, 12 Jul 2023 10:30:25 +0000 (11:30 +0100)
committerGitHub <noreply@github.com>
Wed, 12 Jul 2023 10:30:25 +0000 (11:30 +0100)
.gitattributes
Include/internal/pycore_opcode_metadata.h [moved from Python/opcode_metadata.h with 100% similarity]
Makefile.pre.in
Python/assemble.c
Python/ceval.c
Python/compile.c
Python/flowgraph.c
Python/optimizer.c
Tools/cases_generator/generate_cases.py

index 5e4ce963b63e5c49974827a8babfb98fa91ed4eb..2616da74b48c0f2004a860fbca420c19b3b6f471 100644 (file)
@@ -87,7 +87,7 @@ Programs/test_frozenmain.h                          generated
 Python/Python-ast.c                                 generated
 Python/executor_cases.c.h                           generated
 Python/generated_cases.c.h                          generated
-Python/opcode_metadata.h                            generated
+Include/internal/pycore_opcode_metadata.h           generated
 Python/opcode_targets.h                             generated
 Python/stdlib_module_names.h                        generated
 Tools/peg_generator/pegen/grammar_parser.py         generated
index 073b4bcc271ffccf5310af792a8a63efdaed0f1d..a1ceedbd4812c0a903c52b926c6082906054e51c 100644 (file)
@@ -1548,30 +1548,30 @@ regen-cases:
            $(srcdir)/Tools/cases_generator/generate_cases.py \
                --emit-line-directives \
                -o $(srcdir)/Python/generated_cases.c.h.new \
-               -m $(srcdir)/Python/opcode_metadata.h.new \
+               -m $(srcdir)/Include/internal/pycore_opcode_metadata.h.new \
                -e $(srcdir)/Python/executor_cases.c.h.new \
                -p $(srcdir)/Lib/_opcode_metadata.py.new \
                $(srcdir)/Python/bytecodes.c
        $(UPDATE_FILE) $(srcdir)/Python/generated_cases.c.h $(srcdir)/Python/generated_cases.c.h.new
-       $(UPDATE_FILE) $(srcdir)/Python/opcode_metadata.h $(srcdir)/Python/opcode_metadata.h.new
+       $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_opcode_metadata.h $(srcdir)/Include/internal/pycore_opcode_metadata.h.new
        $(UPDATE_FILE) $(srcdir)/Python/executor_cases.c.h $(srcdir)/Python/executor_cases.c.h.new
        $(UPDATE_FILE) $(srcdir)/Lib/_opcode_metadata.py $(srcdir)/Lib/_opcode_metadata.py.new
 
-Python/compile.o: $(srcdir)/Python/opcode_metadata.h
+Python/compile.o: $(srcdir)/Include/internal/pycore_opcode_metadata.h
 
 Python/ceval.o: \
                $(srcdir)/Python/ceval_macros.h \
                $(srcdir)/Python/condvar.h \
                $(srcdir)/Python/generated_cases.c.h \
-               $(srcdir)/Python/opcode_metadata.h \
+               $(srcdir)/Include/internal/pycore_opcode_metadata.h \
                $(srcdir)/Python/opcode_targets.h
 
 Python/flowgraph.o: \
-               $(srcdir)/Python/opcode_metadata.h
+               $(srcdir)/Include/internal/pycore_opcode_metadata.h
 
 Python/optimizer.o: \
                $(srcdir)/Python/executor_cases.c.h \
-               $(srcdir)/Python/opcode_metadata.h
+               $(srcdir)/Include/internal/pycore_opcode_metadata.h
 
 Python/frozen.o: $(FROZEN_FILES_OUT)
 
index ff7bca22286cd776abd0ecb3e2adddaded1f56d7..b7012534d6cc4eea2abe5fcb215adb0d11da4598 100644 (file)
@@ -1,11 +1,11 @@
 #include <stdbool.h>
 
 #include "Python.h"
-#include "pycore_code.h"          // write_location_entry_start()
+#include "pycore_code.h"            // write_location_entry_start()
 #include "pycore_compile.h"
-#include "pycore_opcode.h"        // _PyOpcode_Caches[] and opcode category macros
-#include "pycore_opcode_utils.h"  // IS_BACKWARDS_JUMP_OPCODE
-#include "opcode_metadata.h"      // IS_PSEUDO_INSTR
+#include "pycore_opcode.h"          // _PyOpcode_Caches[] and opcode category macros
+#include "pycore_opcode_utils.h"    // IS_BACKWARDS_JUMP_OPCODE
+#include "pycore_opcode_metadata.h" // IS_PSEUDO_INSTR
 
 
 #define DEFAULT_CODE_SIZE 128
index 63150a9456bbc88368564254fe4cf29300d2077d..de44085d732cfa4a9de1316749865dbc1a30ce32 100644 (file)
@@ -14,6 +14,7 @@
 #include "pycore_object.h"        // _PyObject_GC_TRACK()
 #include "pycore_moduleobject.h"  // PyModuleObject
 #include "pycore_opcode.h"        // EXTRA_CASES
+#include "pycore_opcode_metadata.h"
 #include "pycore_opcode_utils.h"  // MAKE_FUNCTION_*
 #include "pycore_pyerrors.h"      // _PyErr_GetRaisedException()
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
@@ -30,7 +31,6 @@
 #include "pycore_frame.h"
 #include "frameobject.h"          // _PyInterpreterFrame_GetLine
 #include "opcode.h"
-#include "opcode_metadata.h"
 #include "pydtrace.h"
 #include "setobject.h"
 #include "structmember.h"         // struct PyMemberDef, T_OFFSET_EX
index 29ea2742fad0cff06cd62257104968edddeffe50..d9e38cfdefaf2306cfd64f8ce60bbf4bd2f14c65 100644 (file)
@@ -36,7 +36,7 @@
 #include "pycore_pystate.h"       // _Py_GetConfig()
 #include "pycore_symtable.h"      // PySTEntryObject, _PyFuture_FromAST()
 
-#include "opcode_metadata.h"      // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
+#include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
 
 #define COMP_GENEXP   0
 #define COMP_LISTCOMP 1
index e159a4356dfe4606501d6321b539bc6a4262030d..04f269c5853835bb12b2c0c4396726e3e40a0342 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "pycore_opcode_utils.h"
 #define NEED_OPCODE_METADATA
-#include "opcode_metadata.h"      // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
+#include "pycore_opcode_metadata.h" // _PyOpcode_opcode_metadata, _PyOpcode_num_popped/pushed
 #undef NEED_OPCODE_METADATA
 
 
index 7fc40e66057d305877d0c800ff404efe79b548ee..c3fdee63a7ed485c5c8e80dad21c7cf5d0487ede 100644 (file)
@@ -2,7 +2,7 @@
 #include "opcode.h"
 #include "pycore_interp.h"
 #include "pycore_opcode.h"
-#include "opcode_metadata.h"
+#include "pycore_opcode_metadata.h"
 #include "pycore_opcode_utils.h"
 #include "pycore_pystate.h"       // _PyInterpreterState_GET()
 #include "pycore_uops.h"
index 8c77c1f08335dfbcc859bbd96fffc3fa4f75b100..a20abcde85b7c7a8a8a7fa5dc569a183cd618845 100644 (file)
@@ -24,7 +24,7 @@ THIS = os.path.relpath(__file__, ROOT).replace(os.path.sep, posixpath.sep)
 DEFAULT_INPUT = os.path.relpath(os.path.join(ROOT, "Python/bytecodes.c"))
 DEFAULT_OUTPUT = os.path.relpath(os.path.join(ROOT, "Python/generated_cases.c.h"))
 DEFAULT_METADATA_OUTPUT = os.path.relpath(
-    os.path.join(ROOT, "Python/opcode_metadata.h")
+    os.path.join(ROOT, "Include/internal/pycore_opcode_metadata.h")
 )
 DEFAULT_PYMETADATA_OUTPUT = os.path.relpath(
     os.path.join(ROOT, "Lib/_opcode_metadata.py")