From: David Vázquez Date: Sat, 29 Jun 2013 17:17:14 +0000 (+0200) Subject: LET X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=25289632b5546a09f6e5c23d32e20c5a4a9114a3;p=jscl.git LET --- diff --git a/src/compiler.lisp b/src/compiler.lisp index af7acb6..2da9fd2 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -695,20 +695,16 @@ (cvalues (mapcar #'ls-compile (mapcar #'second bindings))) (*environment* (extend-local-env (remove-if #'special-variable-p variables))) (dynamic-bindings)) - `(code "(function(" - ,@(interleave - (mapcar (lambda (x) - (if (special-variable-p x) - (let ((v (gvarname x))) - (push (cons x v) dynamic-bindings) - v) - (translate-variable x))) - variables) - ",") - "){" - ,(let ((body (ls-compile-block body t t))) - `(code ,(let-binding-wrapper dynamic-bindings body))) - "})(" ,@(interleave cvalues ",") ")"))) + `(call (function ,(mapcar (lambda (x) + (if (special-variable-p x) + (let ((v (gvarname x))) + (push (cons x v) dynamic-bindings) + (make-symbol v)) + (make-symbol (translate-variable x)))) + variables) + ,(let ((body (ls-compile-block body t t))) + `(code ,(let-binding-wrapper dynamic-bindings body)))) + ,@cvalues))) ;;; Return the code to initialize BINDING, and push it extending the