MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

migrate strict args to SLOT

+4 -3
+1
include/common.h
··· 50 50 SLOT_HOISTED_VARS, 51 51 SLOT_HOISTED_VARS_LEN, 52 52 SLOT_STRICT_EVAL_SCOPE, 53 + SLOT_STRICT_ARGS, 53 54 SLOT_NO_FUNC_DECLS, 54 55 SLOT_MAX = 255 55 56 } internal_slot_t;
+3 -3
src/ant.c
··· 5908 5908 return js_mkundef(); 5909 5909 } 5910 5910 if ((streq(keystr, keylen, "callee", 6) || streq(keystr, keylen, "caller", 6)) && 5911 - lkp(js, obj, "__strict_args__", 15) != 0) { 5911 + vtype(get_slot(js, obj, SLOT_STRICT_ARGS)) != T_UNDEF) { 5912 5912 return js_mkerr_typed(js, JS_ERR_TYPE, "'%.*s' not allowed on strict arguments", (int)keylen, keystr); 5913 5913 } 5914 5914 ··· 6046 6046 } 6047 6047 6048 6048 if ((streq(ptr, plen, "callee", 6) || streq(ptr, plen, "caller", 6)) && 6049 - lkp(js, l, "__strict_args__", 15) != 0) { 6049 + vtype(get_slot(js, l, SLOT_STRICT_ARGS)) != T_UNDEF) { 6050 6050 return js_mkerr_typed(js, JS_ERR_TYPE, "'%.*s' not allowed on strict arguments", (int)plen, ptr); 6051 6051 } 6052 6052 ··· 6429 6429 } 6430 6430 setprop_interned(js, arguments_obj, INTERN_LENGTH, 6, tov((double) nargs)); 6431 6431 if (strict) { 6432 - setprop(js, arguments_obj, js_mkstr(js, "__strict_args__", 15), js_mktrue()); 6432 + set_slot(js, arguments_obj, SLOT_STRICT_ARGS, tov(1)); 6433 6433 } else if (vtype(js->current_func) == T_FUNC) { 6434 6434 setprop_interned(js, arguments_obj, INTERN_CALLEE, 6, js->current_func); 6435 6435 }