(type-check (("string" "string" string))
(if *multiple-value-p*
(js!selfcall
- "var v = eval.apply(window, [string]);" *newline*
+ "var v = globalEval(string);" *newline*
"if (typeof v !== 'object' || !('multiple-value' in v)){" *newline*
(indent "v = [v];" *newline*
"v['multiple-value'] = true;" *newline*)
"}" *newline*
"return values.apply(this, v);" *newline*)
- "eval.apply(window, [string])")))
+ "globalEval(string)")))
(define-builtin error (string)
(js!selfcall "throw " string ";" *newline*))
var window = this;
var nil;
-function globalEval (x) {
- return eval.call (window, x);
-}
+globalEval = eval; // Just an indirect eval
function pv (x) { return x==undefined? nil: x; }