Remove CODE and transactional support in codegen for it
authorDavid Vázquez <davazp@gmail.com>
Fri, 5 Jul 2013 16:35:27 +0000 (18:35 +0200)
committerDavid Vázquez <davazp@gmail.com>
Fri, 5 Jul 2013 16:35:27 +0000 (18:35 +0200)
src/compiler-codegen.lisp
src/compiler.lisp

index d624b0e..9bb915d 100644 (file)
   (let ((op1 (car args))
         (op2 (cadr args)))
     (case op
-      ;; Transactional compatible operator
-      (code
-       (js-format "~a" (apply #'code args)))
       ;; Accessors
       (property
        (js-expr (car args) 0)
            (js-format ";")))
         (t
          (case (car form)
-           (code
-            (js-format "~a" (apply #'code (cdr form))))
            (label
             (destructuring-bind (label &body body) (cdr form)
               (js-identifier label)
index f34b1c1..30e430d 100644 (file)
       (when after-last-p
         (collect element)))))
 
-(defun code (&rest args)
-  (mapconcat (lambda (arg)
-               (cond
-                 ((null arg) "")
-                 ((integerp arg) (integer-to-string arg))
-                 ((floatp arg) (float-to-string arg))
-                 ((stringp arg) arg)
-                 (t
-                  (with-output-to-string (*standard-output*)
-                    (js-expr arg)))))
-             args))
-
 ;;; Like CODE, but prefix each line with four spaces. Two versions
 ;;; of this function are available, because the Ecmalisp version is
 ;;; very slow and bootstraping was annoying.
        (let ((code (ls-compile sexp multiple-value-p)))
          `(progn
             ,@(get-toplevel-compilations)
-            (code ,code ";
-")))))))
+            ,code))))))
 
 (defun ls-compile-toplevel (sexp &optional multiple-value-p)
   (with-output-to-string (*standard-output*)