Changeset 13127


Ignore:
Timestamp:
01/06/11 13:42:55 (11 years ago)
Author:
ehuelsmann
Message:

Remove UNSAFE-P from pass1, except for rewriting function calls,
which takes a lot more effort to complete.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/unsafe-p-removal/abcl/src/org/armedbear/lisp/compiler-pass1.lisp

    r13122 r13127  
    399399  form)
    400400
    401 (defknown p1-if (t) t)
    402 (defun p1-if (form)
    403   (let ((test (cadr form)))
    404     (cond ((unsafe-p test)
    405            (cond ((and (consp test)
    406                        (memq (%car test) '(GO RETURN-FROM THROW)))
    407                   (p1 test))
    408                  (t
    409                   (let* ((var (gensym))
    410                          (new-form
    411                           `(let ((,var ,test))
    412                              (if ,var ,(third form) ,(fourth form)))))
    413                     (p1 new-form)))))
    414           (t
    415            (p1-default form)))))
    416 
    417 
    418 (defmacro p1-let/let*-vars
     401(defmacro p1-let/let*-vars
    419402    (block varlist variables-var var body1 body2)
    420403  (let ((varspec (gensym))
     
    13591342                  (FUNCTION             p1-function)
    13601343                  (GO                   p1-go)
    1361                   (IF                   p1-if)
     1344                  (IF                   p1-default)
     1345                  ;; used to be p1-if, which was used to rewrite the test
     1346                  ;; form to a LET-binding; that's not necessary, because
     1347                  ;; the test form doesn't lead to multiple operands on the
     1348                  ;; operand stack
    13621349                  (LABELS               p1-labels)
    13631350                  (LAMBDA               p1-lambda)
Note: See TracChangeset for help on using the changeset viewer.