diff options
author | Ken Jin <kenjin@python.org> | 2024-09-13 16:23:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-13 16:23:51 (GMT) |
commit | 8810e286fa48876422d1b230208911decbead294 (patch) | |
tree | 0d171d70418884104b8681e0e7492d136b8b6778 /Python/generated_cases.c.h | |
parent | 74330d992be26829dba65ab83d698d42b2f2a2ee (diff) | |
download | cpython-8810e286fa48876422d1b230208911decbead294.zip cpython-8810e286fa48876422d1b230208911decbead294.tar.gz cpython-8810e286fa48876422d1b230208911decbead294.tar.bz2 |
gh-121459: Deferred LOAD_GLOBAL (GH-123128)
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Sam Gross <655866+colesbury@users.noreply.github.com>
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 3e9f039..6d902e2 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -5674,7 +5674,7 @@ PREDICTED(LOAD_GLOBAL); _Py_CODEUNIT *this_instr = next_instr - 5; (void)this_instr; - _PyStackRef res; + _PyStackRef *res; _PyStackRef null = PyStackRef_NULL; // _SPECIALIZE_LOAD_GLOBAL { @@ -5696,13 +5696,12 @@ /* Skip 1 cache entry */ // _LOAD_GLOBAL { + res = &stack_pointer[0]; PyObject *name = GETITEM(FRAME_CO_NAMES, oparg>>1); - PyObject *res_o = _PyEval_LoadGlobal(GLOBALS(), BUILTINS(), name); - if (res_o == NULL) goto error; + _PyEval_LoadGlobalStackRef(GLOBALS(), BUILTINS(), name, res); + if (PyStackRef_IsNull(*res)) goto error; null = PyStackRef_NULL; - res = PyStackRef_FromPyObjectSteal(res_o); } - stack_pointer[0] = res; if (oparg & 1) stack_pointer[1] = null; stack_pointer += 1 + (oparg & 1); assert(WITHIN_STACK_BOUNDS()); |