mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-111485: Separate out parsing, analysis and code-gen phases of tier 1 code generator (GH-112299)
This commit is contained in:
parent
3d712a9f4c
commit
b449415b2f
15 changed files with 1675 additions and 526 deletions
3
Python/abstract_interp_cases.c.h
generated
3
Python/abstract_interp_cases.c.h
generated
|
@ -774,7 +774,8 @@
|
|||
}
|
||||
|
||||
case _PUSH_FRAME: {
|
||||
PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true);
|
||||
STACK_SHRINK(1);
|
||||
PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(0)), true);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -800,11 +800,11 @@ dummy_func(
|
|||
// We also push it onto the stack on exit, but that's a
|
||||
// different frame, and it's accounted for by _PUSH_FRAME.
|
||||
op(_POP_FRAME, (retval --)) {
|
||||
assert(EMPTY());
|
||||
#if TIER_ONE
|
||||
assert(frame != &entry_frame);
|
||||
#endif
|
||||
STORE_SP();
|
||||
assert(EMPTY());
|
||||
_Py_LeaveRecursiveCallPy(tstate);
|
||||
// GH-99729: We need to unlink the frame *before* clearing it:
|
||||
_PyInterpreterFrame *dying = frame;
|
||||
|
@ -1165,7 +1165,6 @@ dummy_func(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
inst(STORE_NAME, (v -- )) {
|
||||
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
|
||||
PyObject *ns = LOCALS();
|
||||
|
@ -3130,7 +3129,7 @@ dummy_func(
|
|||
// The 'unused' output effect represents the return value
|
||||
// (which will be pushed when the frame returns).
|
||||
// It is needed so CALL_PY_EXACT_ARGS matches its family.
|
||||
op(_PUSH_FRAME, (new_frame: _PyInterpreterFrame* -- unused)) {
|
||||
op(_PUSH_FRAME, (new_frame: _PyInterpreterFrame* -- unused if (0))) {
|
||||
// Write it out explicitly because it's subtly different.
|
||||
// Eventually this should be the only occurrence of this code.
|
||||
assert(tstate->interp->eval_frame == NULL);
|
||||
|
|
2
Python/executor_cases.c.h
generated
2
Python/executor_cases.c.h
generated
|
@ -661,11 +661,11 @@
|
|||
PyObject *retval;
|
||||
retval = stack_pointer[-1];
|
||||
STACK_SHRINK(1);
|
||||
assert(EMPTY());
|
||||
#if TIER_ONE
|
||||
assert(frame != &entry_frame);
|
||||
#endif
|
||||
STORE_SP();
|
||||
assert(EMPTY());
|
||||
_Py_LeaveRecursiveCallPy(tstate);
|
||||
// GH-99729: We need to unlink the frame *before* clearing it:
|
||||
_PyInterpreterFrame *dying = frame;
|
||||
|
|
1047
Python/generated_cases.c.h
generated
1047
Python/generated_cases.c.h
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue