From: David Vázquez Date: Sat, 29 Jun 2013 16:38:30 +0000 (+0200) Subject: Migrate LABELS X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=e8e89355662f04c69f67f93cc2aef4542b077892;p=jscl.git Migrate LABELS --- diff --git a/src/compiler.lisp b/src/compiler.lisp index b590962..af7acb6 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -615,13 +615,13 @@ (extend-lexenv (mapcar #'make-function-binding fnames) *environment* 'function))) - (js!selfcall - `(code ,@(mapcar (lambda (func) - `(code "var " ,(translate-function (car func)) - " = " ,(compile-lambda (cadr func) - `((block ,(car func) ,@(cddr func)))) - ";" )) - definitions)) + (js!selfcall* + `(progn + ,@(mapcar (lambda (func) + `(var (,(make-symbol (translate-function (car func))) + ,(compile-lambda (cadr func) + `((block ,(car func) ,@(cddr func))))))) + definitions)) (ls-compile-block body t))))