cmp: remove invalid optimization from unwind-exit

The optimization assumed, that we don't need to unwind stacks when there are no
bds nor stack frame changes. That leads to a corrupted IHS environment among
other things.
This commit is contained in:
Daniel Kochmański 2023-11-15 15:06:56 +01:00
parent 38e45ad026
commit f0634e3301

View file

@ -130,11 +130,10 @@
(or (eq (car *destination*) 'JUMP-TRUE)
(eq (car *destination*) 'JUMP-FALSE)))
(unwind-stacks frs-bind bds-lcl bds-bind stack-frame ihs-p))
((not (or (plusp frs-bind) bds-lcl (plusp bds-bind) stack-frame))
(set-loc loc))
;; Save the value if LOC may possibly refer to special binding.
((or (loc-refers-to-special-p loc)
(loc-refers-to-special-p *destination*))
((and (or (plusp frs-bind) bds-lcl (plusp bds-bind) stack-frame)
(or (loc-refers-to-special-p loc)
(loc-refers-to-special-p *destination*)))
(let* ((*temp* *temp*)
(temp (make-temp-var)))
(let ((*destination* temp))