mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
gh-128563: A new tail-calling interpreter (GH-128718)
Co-authored-by: Garrett Gu <garrettgu777@gmail.com> Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com> Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
This commit is contained in:
parent
555dc50c81
commit
cb640b659e
16 changed files with 3883 additions and 623 deletions
|
@ -1387,7 +1387,9 @@ dummy_func(
|
|||
|
||||
tier1 inst(CLEANUP_THROW, (sub_iter_st, last_sent_val_st, exc_value_st -- none, value)) {
|
||||
PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
|
||||
#ifndef Py_TAIL_CALL_INTERP
|
||||
assert(throwflag);
|
||||
#endif
|
||||
assert(exc_value && PyExceptionInstance_Check(exc_value));
|
||||
|
||||
int matches = PyErr_GivenExceptionMatches(exc_value, PyExc_StopIteration);
|
||||
|
@ -5305,6 +5307,9 @@ dummy_func(
|
|||
}
|
||||
#endif
|
||||
RELOAD_STACK();
|
||||
#ifdef Py_TAIL_CALL_INTERP
|
||||
int opcode;
|
||||
#endif
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
@ -5351,8 +5356,10 @@ dummy_func(
|
|||
caller loses its exception */
|
||||
assert(!_PyErr_Occurred(tstate));
|
||||
#endif
|
||||
|
||||
RELOAD_STACK();
|
||||
#ifdef Py_TAIL_CALL_INTERP
|
||||
int opcode;
|
||||
#endif
|
||||
DISPATCH();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue