mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
gh-111354: simplify detection of RESUME after YIELD_VALUE at except-depth 1 (#111459)
This commit is contained in:
parent
970e719a7a
commit
52cc4af6ae
18 changed files with 362 additions and 339 deletions
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue