Merge branch 'master' into fix_aot

This commit is contained in:
2026-02-21 13:31:33 -06:00
146 changed files with 57219 additions and 124492 deletions

View File

@@ -34,14 +34,10 @@
static JSClassID js_dylib_class_id;
static void js_dylib_finalizer(JSRuntime *rt, JSValue val) {
void *handle = JS_GetOpaque(val, js_dylib_class_id);
if (handle) {
#ifdef _WIN32
FreeLibrary((HMODULE)handle);
#else
dlclose(handle);
#endif
}
/* Do NOT dlclose here. Loaded dylibs contain finalizer functions for other
JS objects; if the dylib is freed before those objects during
JS_FreeContext teardown, calling their finalizers would SEGV.
The OS reclaims all loaded libraries on process exit. */
}
static JSClassDef js_dylib_class = {
@@ -740,7 +736,7 @@ static const JSCFunctionListEntry js_os_funcs[] = {
MIST_FUNC_DEF(os, stack, 1),
};
JSValue js_core_os_use(JSContext *js) {
JSValue js_core_internal_os_use(JSContext *js) {
JS_NewClassID(&js_dylib_class_id);
JS_NewClass(js, js_dylib_class_id, &js_dylib_class);