p->is_constructor = (cproto == JS_CFUNC_constructor ||
cproto == JS_CFUNC_constructor_magic ||
cproto == JS_CFUNC_constructor_or_func ||
- cproto == JS_CFUNC_constructor_or_func_magic);
+ cproto == JS_CFUNC_constructor_or_func_magic ||
+ cproto == JS_CFUNC_constructor_or_func_flags);
if (!name)
name = "";
name_atom = JS_NewAtom(ctx, name);
case JS_CFUNC_generic:
ret_val = func.generic(ctx, this_obj, argc, arg_buf);
break;
+ case JS_CFUNC_constructor_or_func_flags:
+ ret_val = func.constructor_or_func_flags(ctx, func_obj, this_obj, argc, arg_buf, flags);
+ break;
case JS_CFUNC_constructor_magic:
case JS_CFUNC_constructor_or_func_magic:
if (!(flags & JS_CALL_FLAG_CONSTRUCTOR)) {
JS_CFUNC_constructor_magic,
JS_CFUNC_constructor_or_func,
JS_CFUNC_constructor_or_func_magic,
+ JS_CFUNC_constructor_or_func_flags,
JS_CFUNC_f_f,
JS_CFUNC_f_f_f,
JS_CFUNC_getter,
JSCFunction *constructor;
JSValue (*constructor_magic)(JSContext *ctx, JSValueConst new_target, int argc, JSValueConst *argv, int magic);
JSCFunction *constructor_or_func;
+ JSValue (*constructor_or_func_flags)(JSContext *ctx, JSValueConst func_obj, JSValueConst this_val, int argc, JSValueConst *argv, int flags);
double (*f_f)(double);
double (*f_f_f)(double, double);
JSValue (*getter)(JSContext *ctx, JSValueConst this_val);