GH-111485: Separate out parsing, analysis and code-gen phases of tier 1 code generator (GH-112299)

This commit is contained in:
Mark Shannon 2023-12-07 12:49:40 +00:00 committed by GitHub
parent 3d712a9f4c
commit b449415b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1675 additions and 526 deletions

View file

@ -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;
}

View file

@ -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);

View file

@ -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;

File diff suppressed because it is too large Load diff