mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
GH-93516: Store offset of first traceable instruction in code object (GH-93769)
This commit is contained in:
parent
2bf74753c1
commit
3cd1a5d3ec
6 changed files with 53 additions and 52 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue