File tree Expand file tree Collapse file tree 11 files changed +661
-605
lines changed Expand file tree Collapse file tree 11 files changed +661
-605
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -1311,8 +1311,10 @@ regen-opcode:
1311
1311
# using Tools/scripts/generate_opcode_h.py
1312
1312
$(PYTHON_FOR_REGEN) $(srcdir)/Tools/scripts/generate_opcode_h.py \
1313
1313
$(srcdir)/Lib/opcode.py \
1314
- $(srcdir)/Include/opcode.h.new
1314
+ $(srcdir)/Include/opcode.h.new \
1315
+ $(srcdir)/Include/internal/pycore_opcode.h.new
1315
1316
$(UPDATE_FILE) $(srcdir)/Include/opcode.h $(srcdir)/Include/opcode.h.new
1317
+ $(UPDATE_FILE) $(srcdir)/Include/internal/pycore_opcode.h $(srcdir)/Include/internal/pycore_opcode.h.new
1316
1318
1317
1319
.PHONY: regen-token
1318
1320
regen-token:
Original file line number Diff line number Diff line change 5
5
#include "structmember.h" // PyMemberDef
6
6
#include "pycore_code.h" // _PyCodeConstructor
7
7
#include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs
8
+ #include "pycore_opcode.h" // _PyOpcode_Deopt
8
9
#include "pycore_pystate.h" // _PyInterpreterState_GET()
9
10
#include "pycore_tuple.h" // _PyTuple_ITEMS()
10
11
#include "clinic/codeobject.c.h"
Original file line number Diff line number Diff line change 2
2
3
3
#include "Python.h"
4
4
#include "pycore_ceval.h" // _PyEval_BuiltinsFromGlobals()
5
- #include "pycore_moduleobject.h" // _PyModule_GetDict()
6
- #include "pycore_object.h" // _PyObject_GC_UNTRACK()
7
5
#include "pycore_code.h" // CO_FAST_LOCAL, etc.
8
6
#include "pycore_function.h" // _PyFunction_FromConstructor()
7
+ #include "pycore_moduleobject.h" // _PyModule_GetDict()
8
+ #include "pycore_object.h" // _PyObject_GC_UNTRACK()
9
+ #include "pycore_opcode.h" // _PyOpcode_Caches
9
10
10
11
#include "frameobject.h" // PyFrameObject
11
12
#include "pycore_frame.h"
Original file line number Diff line number Diff line change 3
3
#include "Python.h"
4
4
#include "pycore_call.h" // _PyObject_CallNoArgs()
5
5
#include "pycore_ceval.h" // _PyEval_EvalFrame()
6
+ #include "pycore_frame.h" // _PyInterpreterFrame
6
7
#include "pycore_genobject.h" // struct _Py_async_gen_state
7
8
#include "pycore_object.h" // _PyObject_GC_UNTRACK()
9
+ #include "pycore_opcode.h" // _PyOpcode_Deopt
8
10
#include "pycore_pyerrors.h" // _PyErr_ClearExcState()
9
11
#include "pycore_pystate.h" // _PyThreadState_GET()
10
- #include "pycore_frame.h" // _PyInterpreterFrame
11
- #include "frameobject.h" // PyFrameObject
12
12
#include "structmember.h" // PyMemberDef
13
13
#include "opcode.h" // SEND
14
14
Original file line number Diff line number Diff line change 14
14
<Argument >-C</Argument >
15
15
</_ASTOutputs >
16
16
<_OpcodeSources Include =" $(PySourcePath)Tools\scripts\generate_opcode_h.py;$(PySourcePath)Lib\opcode.py" />
17
- <_OpcodeOutputs Include =" $(PySourcePath)Include\opcode.h;$(PySourcePath)Python\opcode_targets.h" />
17
+ <_OpcodeOutputs Include =" $(PySourcePath)Include\opcode.h;$(PySourcePath)Include\internal\pycore_opcode.h;$(PySourcePath) Python\opcode_targets.h" />
18
18
<_TokenSources Include =" $(PySourcePath)Grammar\Tokens" />
19
19
<_TokenOutputs Include =" $(PySourcePath)Doc\library\token-list.inc" >
20
20
<Format >rst</Format >
59
59
Inputs =" @(_OpcodeSources)" Outputs =" @(_OpcodeOutputs)"
60
60
DependsOnTargets =" FindPythonForBuild" >
61
61
<Message Text =" Regenerate @(_OpcodeOutputs->'%(Filename)%(Extension)',' ')" Importance =" high" />
62
- <Exec Command =" $(PythonForBuild) Tools\scripts\generate_opcode_h.py Lib\opcode.py Include\opcode.h"
62
+ <Exec Command =" $(PythonForBuild) Tools\scripts\generate_opcode_h.py Lib\opcode.py Include\opcode.h Include\internal\pycore_opcode.h "
63
63
WorkingDirectory =" $(PySourcePath)" />
64
64
<Exec Command =" $(PythonForBuild) Python\makeopcodetargets.py Python\opcode_targets.h"
65
65
WorkingDirectory =" $(PySourcePath)" />
Original file line number Diff line number Diff line change 15
15
#include "pycore_long.h" // _PyLong_GetZero()
16
16
#include "pycore_object.h" // _PyObject_GC_TRACK()
17
17
#include "pycore_moduleobject.h" // PyModuleObject
18
+ #include "pycore_opcode.h" // EXTRA_CASES
18
19
#include "pycore_pyerrors.h" // _PyErr_Fetch()
19
20
#include "pycore_pylifecycle.h" // _PyErr_Print()
20
21
#include "pycore_pymem.h" // _PyMem_IsPtrFreed()
Original file line number Diff line number Diff line change 23
23
24
24
#include <stdbool.h>
25
25
26
+ // Need _PyOpcode_RelativeJump of pycore_opcode.h
27
+ #define NEED_OPCODE_TABLES
28
+
26
29
#include "Python.h"
27
30
#include "pycore_ast.h" // _PyAST_GetDocString()
28
- #include "pycore_compile.h" // _PyFuture_FromAST()
29
31
#include "pycore_code.h" // _PyCode_New()
30
- #include "pycore_pymem .h" // _PyMem_IsPtrFreed ()
32
+ #include "pycore_compile .h" // _PyFuture_FromAST ()
31
33
#include "pycore_long.h" // _PyLong_GetZero()
34
+ #include "pycore_opcode.h" // _PyOpcode_Caches
35
+ #include "pycore_pymem.h" // _PyMem_IsPtrFreed()
32
36
#include "pycore_symtable.h" // PySTEntryObject
33
37
34
- #define NEED_OPCODE_TABLES
35
- #include "opcode.h" // EXTENDED_ARG
36
-
37
38
38
39
#define DEFAULT_BLOCK_SIZE 16
39
40
#define DEFAULT_CODE_SIZE 128
Original file line number Diff line number Diff line change 6
6
#include "pycore_long.h"
7
7
#include "pycore_moduleobject.h"
8
8
#include "pycore_object.h"
9
- #include "opcode .h"
9
+ #include "pycore_opcode .h" // _PyOpcode_Caches
10
10
#include "structmember.h" // struct PyMemberDef, T_OFFSET_EX
11
11
12
12
#include <stdlib.h> // rand()
You can’t perform that action at this time.
0 commit comments