effekt icon indicating copy to clipboard operation
effekt copied to clipboard

Allocate region variables as "local variables" on previous stack

Open serkm opened this issue 4 months ago • 1 comments

@phischu I hate how this turned out.

When allocating into a region, we cannot know the answer type of that region. This makes it impossible to push a regular return address.

As a workaround, variables are allocated with a special return function, that removes the region from the stack. When underflowing a region, we first call this special function, and then return regularly.

Also, this breaks globals, as the first stack has no previous stack.

serkm avatar Oct 14 '24 14:10 serkm