-
Notifications
You must be signed in to change notification settings - Fork 30
Description
With #231 we unfortunately regress on the ClosureDefFibonacci benchmark, because we do not avoid splitting any more.
#177 introduce a mechanism that can avoid splitting.
Unfortunately it is incorrect, because scope elements have a parent scope, which can't be correctly maintained when we avoid splitting scopes.
A correct solution needs to disentangle lexical representations and run-time representations completely, so that splitting can be applied only on the run-time representations, and as independent as possible from other scopes.
The run-time representations probably should be the root nodes (Invokable/Method/Primitive) and SBlock/SObject with enclosing object.
We can use those to walk the scope chain, when possible to determine concrete run time objects.
The lexical scope structures can remain, but we need to move all information about specialization to the run time objects. Thus, things like frame descriptors, variable type info, etc needs to go to the root nodes, etc.
We should also revisit which information we actually use to determine whether splitting can happen, we might be able to track less, and remove some unused code.