]> ocean-lang.org Git - ocean/commit
oceani: improve construction of per-function stack frame
authorNeilBrown <neil@brown.name>
Fri, 19 Nov 2021 22:10:36 +0000 (09:10 +1100)
committerNeilBrown <neil@brown.name>
Sat, 20 Nov 2021 00:22:25 +0000 (11:22 +1100)
commit234ae7c044ea183c719799a5369b2cfcbc69fd27
tree4ba2fd631f3345b0f92f1ed1e24fa9060ce05450
parent211c350aee530ff43771ddc1f49c013e7183f507
oceani: improve construction of per-function stack frame

The stack-frame management was confused - not properly transitioned from
a single function to multiple functions.
Now we pass in the function to be processed, and it has a known list of
variables that were in-scope in that function.

We track when each variable went into or out-of scope, sort them, and
re-use frame space for variables which have already gone out-of-scope.

Signed-off-by: NeilBrown <neil@brown.name>
csrc/oceani.mdc