diff options
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r-- | Objects/codeobject.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 2a2f132..8ac4e99 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -339,6 +339,12 @@ init_code(PyCodeObject *co, struct _PyCodeConstructor *con) co->co_warmup = QUICKENING_INITIAL_WARMUP_VALUE; memcpy(_PyCode_CODE(co), PyBytes_AS_STRING(con->code), PyBytes_GET_SIZE(con->code)); + int entry_point = 0; + while (entry_point < Py_SIZE(co) && + _Py_OPCODE(_PyCode_CODE(co)[entry_point]) != RESUME) { + entry_point++; + } + co->_co_firsttraceable = entry_point; } static int |