diff --git a/src/cmp/cmpif.lsp b/src/cmp/cmpif.lsp index 59c282a7c..9cf7d61b2 100644 --- a/src/cmp/cmpif.lsp +++ b/src/cmp/cmpif.lsp @@ -246,20 +246,24 @@ (unwind-exit nil)))) (defun c2fmla-or (butlast last) - (let* ((normal-exit (next-label)) - (ue (cons normal-exit *unwind-exit*)) - (dest *destination*)) - (cond (t + (cond ((jump-true-destination?) + (mapc #'c2expr* butlast) + (c2expr last)) + ((jump-false-destination?) + (with-exit-label (true-label) + (let ((*destination* `(JUMP-TRUE ,true-label))) + (mapc #'c2expr* butlast)) + (c2expr last)) + (unwind-exit t)) + (t + (with-exit-label (normal-exit) (dolist (f butlast) (let ((*destination* 'VALUE0)) (c2expr* f)) - (let ((*exit* normal-exit) - (*unwind-exit* ue)) - (set-jump-true 'VALUE0 normal-exit))) + (set-jump-true 'VALUE0 normal-exit)) (let ((*destination* 'VALUE0)) - (c2expr* last)) - (wt-label normal-exit) - (unwind-exit 'VALUE0))))) + (c2expr* last))) + (unwind-exit 'VALUE0)))) (defun set-jump-true (loc label) (multiple-value-bind (constantp value)