From dc73e86d8caa8fb3e4f6a4308575f5a53aac0ae8 Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Sat, 7 Feb 2026 10:51:45 -0600 Subject: [PATCH] handle mcode in callinternal --- source/quickjs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/quickjs.c b/source/quickjs.c index 3870d7b5..24e5e112 100644 --- a/source/quickjs.c +++ b/source/quickjs.c @@ -2008,6 +2008,8 @@ static JSValue js_call_c_function (JSContext *ctx, JSValue func_obj, JSValue thi static JSValue js_call_bound_function (JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv); static JSValue JS_CallInternal (JSContext *ctx, JSValue func_obj, JSValue this_obj, int argc, JSValue *argv, int flags); static JSValue JS_CallRegisterVM(JSContext *ctx, JSCodeRegister *code, JSValue this_obj, int argc, JSValue *argv, JSValue env, JSValue outer_frame); +static JSValue mcode_exec(JSContext *ctx, JSMCode *code, JSValue this_obj, + int argc, JSValue *argv, JSValue outer_frame); int JS_DeleteProperty (JSContext *ctx, JSValue obj, JSValue prop); JSValue __attribute__ ((format (printf, 2, 3))) JS_ThrowInternalError (JSContext *ctx, const char *fmt, ...); @@ -6733,6 +6735,8 @@ static JSValue JS_CallInternal (JSContext *caller_ctx, JSValue func_obj, JSValue return js_call_c_function (caller_ctx, func_obj, this_obj, argc, (JSValue *)argv); case JS_FUNC_KIND_BYTECODE: break; /* continue to bytecode execution below */ + case JS_FUNC_KIND_MCODE: + return mcode_exec(caller_ctx, f->u.mcode.code, this_obj, argc, (JSValue *)argv, f->u.mcode.outer_frame); default: goto not_a_function; }