handle mcode in callinternal

This commit is contained in:
2026-02-07 10:51:45 -06:00
parent 0287d6ada4
commit dc73e86d8c

View File

@@ -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_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_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 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); int JS_DeleteProperty (JSContext *ctx, JSValue obj, JSValue prop);
JSValue __attribute__ ((format (printf, 2, 3))) JSValue __attribute__ ((format (printf, 2, 3)))
JS_ThrowInternalError (JSContext *ctx, const char *fmt, ...); 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); return js_call_c_function (caller_ctx, func_obj, this_obj, argc, (JSValue *)argv);
case JS_FUNC_KIND_BYTECODE: case JS_FUNC_KIND_BYTECODE:
break; /* continue to bytecode execution below */ 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: default:
goto not_a_function; goto not_a_function;
} }