Remove CONVERT*
[jscl.git] / src / compiler.lisp
index a662d4d..6e26947 100644 (file)
             (eq (binding-type b) 'variable)
             (not (member 'special (binding-declarations b)))
             (not (member 'constant (binding-declarations b))))
-       ;; TODO: Unnecesary make-symbol when codegen migration is
-       ;; finished.
        `(= ,(binding-value b) ,(convert val)))
       ((and b (eq (binding-type b) 'macro))
        (convert `(setf ,var ,val)))
   (cond
     ((integerp sexp) sexp)
     ((floatp sexp) sexp)
-    ((characterp sexp)
-     ;; TODO: Remove selfcall after migration
-     `(selfcall (return ,(string sexp))))
+    ((characterp sexp) (string sexp))
     (t
      (or (cdr (assoc sexp *literal-table* :test #'eql))
          (let ((dumped (typecase sexp
 (define-compilation %while (pred &rest body)
   `(selfcall
     (while (!== ,(convert pred) ,(convert nil))
-      0                                 ; TODO: Force
-                                        ; braces. Unnecesary when code
-                                        ; is gone
       ,(convert-block body))
     (return ,(convert nil))))
 
                        `(return (method-call |values| "apply" this (call |forcemv| (get cf "values"))))
                        `(return (get cf "values")))
                   (throw cf))))
-          ;; TODO: is selfcall necessary here?
           `(selfcall ,cbody)))))
 
 (define-compilation return-from (name &optional value)
 (define-compilation multiple-value-prog1 (first-form &rest forms)
   `(selfcall
     (var (args ,(convert first-form *multiple-value-p*)))
-    ;; TODO: Interleave is temporal
     (progn ,@(mapcar #'convert forms))
     (return args)))
 
            (return ,(convert (car (last sexps)) *multiple-value-p*)))
         `(progn ,@(mapcar #'convert sexps)))))
 
-(defun convert* (sexp &optional multiple-value-p)
+(defun convert (sexp &optional multiple-value-p)
   (multiple-value-bind (sexp expandedp) (!macroexpand-1 sexp)
     (when expandedp
-      (return-from convert* (convert sexp multiple-value-p)))
+      (return-from convert (convert sexp multiple-value-p)))
     ;; The expression has been macroexpanded. Now compile it!
     (let ((*multiple-value-p* multiple-value-p))
       (cond
         (t
          (error "How should I compile `~S'?" sexp))))))
 
-(defun convert (sexp &optional multiple-value-p)
-  (convert* sexp multiple-value-p))
-
 
 (defvar *compile-print-toplevels* nil)