cmp: unwind-label: relax conditions for carrying the value

There is no need to carry the location value across the unwind when the
destination is not special, because then we may assign the destination before we
unwind the stack. That allows us to skip examining the unwind requirements.
This commit is contained in:
Daniel Kochmański 2023-11-30 08:31:54 +01:00
parent d13d400654
commit dfa02ba434

View file

@ -152,10 +152,9 @@
;; This operator does not cross the function boundary.
(assert (null exit-p))
(cond ((and (destination-value-matters-p *destination*)
(or (plusp frs-bind) bds-lcl (plusp bds-bind) stack-frame)
(or (loc-refers-to-special-p loc)
(loc-refers-to-special-p *destination*)))
;; Save the value if LOC may possibly refer to special binding.
(loc-refers-to-special-p *destination*))
;; Save the value if *DESTINATION* may possibly refer to special
;; binding. Otherwise we may set *DESTINATION* /before/ the unwind.
(let* ((*temp* *temp*)
(temp (make-temp-var)))
(set-loc temp loc)