[armedbear-cvs] r12097 - trunk/abcl/src/org/armedbear/lisp

Erik Huelsmann ehuelsmann at common-lisp.net
Wed Aug 12 20:41:47 UTC 2009


Author: ehuelsmann
Date: Wed Aug 12 16:41:44 2009
New Revision: 12097

Log:
Revert r12096; restores build breakage.

Modified:
   trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
   trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass1.lisp	Wed Aug 12 16:41:44 2009
@@ -340,7 +340,7 @@
       ;;
       ;; However, p1 transforms the forms being processed, so, we
       ;; need to copy the forms to create a second copy.
-      (let* ((block (make-unwind-protect-node :name '(UNWIND-PROTECT)))
+      (let* ((block (make-block-node '(UNWIND-PROTECT)))
              ;; a bit of jumping through hoops...
              (unwinding-forms (p1-body (copy-tree (cddr form))))
              (unprotected-forms (p1-body (cddr form)))
@@ -348,7 +348,7 @@
              ;; protected by the UNWIND-PROTECT block
              (*blocks* (cons block *blocks*))
              (protected-form (p1 (cadr form))))
-        (setf (unwind-protect-form block)
+        (setf (block-form block)
               `(unwind-protect ,protected-form
                  (progn , at unwinding-forms)
                  , at unprotected-forms))

Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	(original)
+++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp	Wed Aug 12 16:41:44 2009
@@ -7783,7 +7783,7 @@
     (emit-move-from-stack target)))
 
 (defun p2-unwind-protect-node (block target)
-  (let ((form (unwind-protect-form block)))
+  (let ((form (block-form block)))
     (when (= (length form) 2) ; No cleanup form.
       (compile-form (second form) target nil)
       (return-from p2-unwind-protect-node))
@@ -7902,12 +7902,40 @@
                 (aver nil))))
         ((var-ref-p form)
          (compile-var-ref form target representation))
+        ((block-node-p form)
+         (let ((name (block-name form)))
+           (if (not (consp name))
+               (p2-block-node form target representation)
+               (let ((name (car name)))
+                 (cond
+                   ((eq name 'LET)
+                    (p2-let/let*-node form target representation))
+                   ((eq name 'FLET)
+                    (p2-flet-node form target representation))
+                   ((eq name 'LABELS)
+                    (p2-labels-node form target representation))
+                   ((eq name 'MULTIPLE-VALUE-BIND)
+                    (p2-m-v-b-node form target)
+                    (fix-boxing representation nil))
+                   ((eq name 'UNWIND-PROTECT)
+                    (p2-unwind-protect-node form target)
+                    (fix-boxing representation nil))
+                   ((eq name 'CATCH)
+                    (p2-catch-node form target)
+                    (fix-boxing representation nil))
+                   ((eq name 'PROGV)
+                    (p2-progv-node form target representation))
+                   ((eq name 'LOCALLY)
+                    (p2-locally-node form target representation))
+                   ((eq name 'THREADS:SYNCHRONIZED-ON)
+                    (p2-threads-synchronized-on form target)
+                    (fix-boxing representation nil)))))))
         ((node-p form)
          (cond
-           ((tagbody-node-p form) ;; done
+           ((tagbody-node-p form)
             (p2-tagbody-node form target)
             (fix-boxing representation nil))
-           ((unwind-protect-node-p form) ;; done
+           ((unwind-protect-node-p form)
             (p2-unwind-protect-node form target)
             (fix-boxing representation nil))
            ((locally-node-p form)
@@ -7917,32 +7945,6 @@
             (fix-boxing representation nil))
            ((progv-node-p form)
             (p2-progv-node form target representation))
-           ((block-node-p form)
-            (let ((name (block-name form)))
-              (if (not (consp name))
-                  (p2-block-node form target representation)
-                  ;; TODO: this branch of the IF is to be eliminated
-                  (let ((name (car name)))
-                    (cond
-                      ((eq name 'LET)
-                       (p2-let/let*-node form target representation))
-                      ((eq name 'FLET)
-                       (p2-flet-node form target representation))
-                      ((eq name 'LABELS)
-                       (p2-labels-node form target representation))
-                      ((eq name 'MULTIPLE-VALUE-BIND)
-                       (p2-m-v-b-node form target)
-                       (fix-boxing representation nil))
-                      ((eq name 'CATCH)
-                       (p2-catch-node form target)
-                       (fix-boxing representation nil))
-                      ((eq name 'LOCALLY)
-                       (p2-locally-node form target representation))
-                      ((eq name 'PROGV)
-                       (p2-progv-node form target representation))
-                      ((eq name 'THREADS:SYNCHRONIZED-ON)
-                       (p2-threads-synchronized-on form target)
-                       (fix-boxing representation nil)))))))
 ))
         ((constantp form)
          (compile-constant form target representation))




More information about the armedbear-cvs mailing list