gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 (#111459)

This commit is contained in:
Irit Katriel 2023-11-02 10:18:43 +00:00 committed by GitHub
parent 970e719a7a
commit 52cc4af6ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 362 additions and 339 deletions

View file

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