X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=ecmalisp.lisp;h=16f557d3a70b900dee749587b392d81dda5a6733;hb=3a2502768f064d430acbe5ca011045d5368dd7cb;hp=0801df4f45a88266e40c01ab26aa684da8b56243;hpb=ad28d0c42e2a8b37c0213a37f5966f7198fe8b02;p=jscl.git diff --git a/ecmalisp.lisp b/ecmalisp.lisp index 0801df4..16f557d 100644 --- a/ecmalisp.lisp +++ b/ecmalisp.lisp @@ -23,7 +23,24 @@ ;;; language to the compiler to be able to run. #+ecmalisp -(js-eval "function pv (x) { return typeof x === 'object' && 'car' in x ? x.car : x; }") +(js-eval "function pv (x) { return x ; }") + +#+ecmalisp +(js-eval " +function mv(){ + var r = []; + r['multiple-value'] = true; + for (var i=0; i >= and append apply aref arrayp aset assoc atom block boundp boundp butlast caar cadddr caddr cadr car car case catch cdar cdddr cddr cdr cdr char char-code char= code-char cond cons consp copy-list - decf declaim defparameter defun defmacro defvar digit-char-p disassemble - documentation dolist dotimes ecase eq eql equal error eval every - export fdefinition find-package find-symbol first fourth fset funcall - function functionp gensym get-universal-time go identity if in-package - incf integerp integerp intern keywordp lambda last length let let* - list-all-packages list listp make-array make-package make-symbol - mapcar member minusp mod nil not nth nthcdr null numberp or - package-name package-use-list packagep plusp prin1-to-string print - proclaim prog1 prog2 progn psetq push quote remove remove-if - remove-if-not return return-from revappend reverse second set setq - some string-upcase string string= stringp subseq symbol-function - symbol-name symbol-package symbol-plist symbol-value symbolp t tagbody - third throw truncate unless unwind-protect variable warn when - write-line write-string zerop)) + decf declaim defparameter defun defmacro defvar digit-char-p + disassemble documentation dolist dotimes ecase eq eql equal error eval + every export fdefinition find-package find-symbol first fourth fset + funcall function functionp gensym get-universal-time go identity if + in-package incf integerp integerp intern keywordp lambda last length + let let* list-all-packages list listp make-array make-package + make-symbol mapcar member minusp mod multiple-value-bind + multiple-value-call multiple-value-list multiple-value-prog1 nil not + nth nthcdr null numberp or package-name package-use-list packagep + plusp prin1-to-string print proclaim prog1 prog2 progn psetq push + quote remove remove-if remove-if-not return return-from revappend + reverse second set setq some string-upcase string string= stringp + subseq symbol-function symbol-name symbol-package symbol-plist + symbol-value symbolp t tagbody third throw truncate unless + unwind-protect values values-list variable warn when write-line + write-string zerop)) (setq *package* *user-package*) @@ -2082,9 +2128,9 @@ (js-vset "lisp.read" #'ls-read-from-string) (js-vset "lisp.print" #'prin1-to-string) (js-vset "lisp.eval" #'eval) - (js-vset "lisp.compile" #'ls-compile-toplevel) + (js-vset "lisp.compile" (lambda (s) (ls-compile-toplevel s t))) (js-vset "lisp.evalString" (lambda (str) (eval (ls-read-from-string str)))) - (js-vset "lisp.compileString" (lambda (str) (ls-compile-toplevel (ls-read-from-string str)))) + (js-vset "lisp.compileString" (lambda (str) (ls-compile-toplevel (ls-read-from-string str) t))) ;; Set the initial global environment to be equal to the host global ;; environment at this point of the compilation.