Squeeze out over allocated spaces, dry the sponge.
This PR serves as a fix (or optimization) for local variable allocation in frame pointer based compilation (avm-ver $\ge$ 8).
The problem is that, frame pointer based compilation leads to ABI value allocation "context sensitive":
if it is new under no proto, then it is based on scratch var
otherwise, if it is new under a frame pointer based subroutine (with proto), then its life cycle is in the subroutine, thus it can be based on a stack position, relative to frame pointer location.
This PR's contribution is following 2-folds:
Fixed the subroutine evaluation process, that:
allocates arguments + output values under right proto
separation between frame based evaluation and scratch based evaluation
Minor changed integration test - ABIRoundtrip test code generation logic, as stated above that ABI value new instance is "context sensitive", then we create needed instance inside subroutine of generated code.
This removed previously unnoticed scratch slot usage in tuple related roundtrip test (which is tricky, for the assumption on newing instance changed subtly).
BTW, we can't merge in like this - there are experimental code in compilation (some option to activate/deactivate). We probably need to settle down about merge to where, how to merge.
Squeeze out over allocated spaces, dry the sponge.
This PR serves as a fix (or optimization) for local variable allocation in frame pointer based compilation (avm-ver $\ge$ 8).
The problem is that, frame pointer based compilation leads to ABI value allocation "context sensitive":
This PR's contribution is following 2-folds: