Fix missing lazy-related symbols for the JIT (#34)

* fix missing `PyLazyImport_CheckExact`

* fix missing lazy-related symbols

* fix missing lazy-related symbols

* `extern` seems enough

* Export _PyImport_LoadLazyImportTstate for JIT
This commit is contained in:
Bénédikt Tran 2025-12-08 00:57:22 +01:00 committed by GitHub
parent c4ed3c4119
commit 5000033162
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 18 additions and 5 deletions

View file

@ -11,12 +11,15 @@
#include "pycore_audit.h" // _PySys_Audit()
#include "pycore_backoff.h"
#include "pycore_cell.h" // PyCell_GetRef()
#include "pycore_ceval.h" // _PyEval_LazyImportName(), _PyEval_LazyImportFrom()
#include "pycore_code.h"
#include "pycore_emscripten_signal.h" // _Py_CHECK_EMSCRIPTEN_SIGNALS
#include "pycore_function.h"
#include "pycore_import.h" // _PyImport_LoadLazyImportTstate()
#include "pycore_instruments.h"
#include "pycore_interpolation.h" // _PyInterpolation_Build()
#include "pycore_intrinsics.h"
#include "pycore_lazyimportobject.h" // PyLazyImport_CheckExact()
#include "pycore_long.h" // _PyLong_ExactDealloc(), _PyLong_GetZero()
#include "pycore_moduleobject.h" // PyModuleObject
#include "pycore_object.h" // _PyObject_GC_TRACK()
@ -2939,7 +2942,7 @@ dummy_func(
b = res ? PyStackRef_True : PyStackRef_False;
}
inst(IMPORT_NAME, (level, fromlist -- res)) {
inst(IMPORT_NAME, (level, fromlist -- res)) {
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg >> 2);
PyObject *res_o;
if (!(oparg & 0x02)) {