From fc74a350c8382575b8e924e60cdaf5033e70d49e Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Sun, 12 May 2013 14:58:47 +0100 Subject: [PATCH] Fix ir-complete --- experimental/compiler.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/experimental/compiler.lisp b/experimental/compiler.lisp index 30e8d4a..388157f 100644 --- a/experimental/compiler.lisp +++ b/experimental/compiler.lisp @@ -339,6 +339,11 @@ `(dolist (,block (component-blocks ,component) ,result) ,@body)) +(defmacro do-blocks-backward ((block component &optional result) &body body) + `(dolist (,block (reverse (component-blocks ,component)) ,result) + ,@body)) + + ;;; A few consistency checks in the IR useful for catching bugs. (defun check-ir-consistency (component) (with-simple-restart (continue "Continue execution") @@ -623,7 +628,7 @@ t)))) (defun ir-complete (&optional (component *component*)) - (do-blocks (block component) + (do-blocks-backward (block component) (maybe-coalesce-block block) (when (empty-block-p block) (delete-empty-block block)))) -- 1.7.10.4