mirror of
https://github.com/ccxvii/mujs.git
synced 2026-02-06 09:51:41 +08:00
Define built-in functions with the full name.
Improves error messages and stack traces.
This commit is contained in:
@@ -199,10 +199,10 @@ void jsB_initfunction(js_State *J)
|
||||
|
||||
js_pushobject(J, J->Function_prototype);
|
||||
{
|
||||
jsB_propf(J, "toString", Fp_toString, 2);
|
||||
jsB_propf(J, "apply", Fp_apply, 2);
|
||||
jsB_propf(J, "call", Fp_call, 1);
|
||||
jsB_propf(J, "bind", Fp_bind, 1);
|
||||
jsB_propf(J, "Function.prototype.toString", Fp_toString, 2);
|
||||
jsB_propf(J, "Function.prototype.apply", Fp_apply, 2);
|
||||
jsB_propf(J, "Function.prototype.call", Fp_call, 1);
|
||||
jsB_propf(J, "Function.prototype.bind", Fp_bind, 1);
|
||||
}
|
||||
js_newcconstructor(J, jsB_Function, jsB_Function, "Function", 1);
|
||||
js_defglobal(J, "Function", JS_DONTENUM);
|
||||
|
||||
Reference in New Issue
Block a user