stack: Fix preservation of interleaved dynamic extents.
commit6e96871d4d2b0ba0e7afd1b3320282747cac4a1f
authorCharles Zhang <charleszhang99@yahoo.com>
Thu, 7 Sep 2023 19:31:33 +0000 (7 21:31 +0200)
committerCharles Zhang <charleszhang99@yahoo.com>
Thu, 7 Sep 2023 19:53:41 +0000 (7 21:53 +0200)
tree26f8d771853d1ad636237f4f28905822c2069f24
parentac267f21721663b196aefe4bfd998416e3cc4332
stack: Fix preservation of interleaved dynamic extents.

We need to recheck during order-lvar-stacks whether
%PRESERVE-DYNAMIC-EXTENT is actually necessary. It may be the case
that there was no actual interleaving due to the fact that the
offending stack lvar was already popped off the stack (no longer
live). The stack mess-up walk isn't equipped to detect that.

The stack preservation logic isn't great. Maybe there is some better
design for this.

Fixes lp#2034739, lp#2034751.
src/compiler/stack.lisp
tests/dynamic-extent.pure.lisp