Migrate LABELS
authorDavid Vázquez <davazp@gmail.com>
Sat, 29 Jun 2013 16:38:30 +0000 (18:38 +0200)
committerDavid Vázquez <davazp@gmail.com>
Sat, 29 Jun 2013 16:38:30 +0000 (18:38 +0200)
src/compiler.lisp

index b590962..af7acb6 100644 (file)
           (extend-lexenv (mapcar #'make-function-binding fnames)
                          *environment*
                          'function)))
           (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))))
 
 
       (ls-compile-block body t))))