X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=prelude.js;h=38a13d7fdb52ce9d7d011b820d885498eed2ad8e;hb=ad19ec082d2d9aa6877cc0bbae9ec3fe3094f489;hp=cf976a04a6d06bf3cdd3a405032e6f170265d988;hpb=845aad879287d067fffa6a872e03a24935bf8fc6;p=jscl.git diff --git a/prelude.js b/prelude.js index cf976a0..38a13d7 100644 --- a/prelude.js +++ b/prelude.js @@ -1,13 +1,25 @@ -function pv (x) { return x ; } +// This file is prepended to the result of compile ecmalisp.lisp, and +// contain runtime code that ecmalisp assumes to exist. + +var window = this; +var nil; + +function globalEval (x) { + return eval.call (window, x); +} + +function pv (x) { return x==undefined? nil: x; } function mv(){ - var r = []; + var r = [].slice.call(arguments); r['multiple-value'] = true; - for (var i=0; i