diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-11-02 10:18:43 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-02 10:18:43 (GMT) |
commit | 52cc4af6ae9002f11605f91b672746c127494efd (patch) | |
tree | 1bb4c679b3e179fdb9ccbacff4316c98fd594e79 /Objects/codeobject.c | |
parent | 970e719a7a829bddc647bbaa668dd8603abdddef (diff) | |
download | cpython-52cc4af6ae9002f11605f91b672746c127494efd.zip cpython-52cc4af6ae9002f11605f91b672746c127494efd.tar.gz cpython-52cc4af6ae9002f11605f91b672746c127494efd.tar.bz2 |
gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 (#111459)
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r-- | Objects/codeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 48ff5b8..79ac574 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -7,6 +7,7 @@ #include "pycore_frame.h" // FRAME_SPECIALS_SIZE #include "pycore_interp.h" // PyInterpreterState.co_extra_freefuncs #include "pycore_opcode_metadata.h" // _PyOpcode_Deopt, _PyOpcode_Caches +#include "pycore_opcode_utils.h" // RESUME_AT_FUNC_START #include "pycore_pystate.h" // _PyInterpreterState_GET() #include "pycore_setobject.h" // _PySet_NextEntry() #include "pycore_tuple.h" // _PyTuple_ITEMS() @@ -719,7 +720,7 @@ PyUnstable_Code_New(int argcount, int kwonlyargcount, // test.test_code.CodeLocationTest.test_code_new_empty to keep it in sync! static const uint8_t assert0[6] = { - RESUME, 0, + RESUME, RESUME_AT_FUNC_START, LOAD_ASSERTION_ERROR, 0, RAISE_VARARGS, 1 }; |