-
Bug
-
Resolution: Fixed
-
P3
-
None
-
None
-
b34
-
generic
-
generic
Optimistic splitter works by replacing split nodes with anonymous function invocations. Part of this is moving all "var" statements out of nested functions into the outermost function. However, "let" and "const" are block scoped, and can't be moved without affecting the semantics of the program. They can't even be moved to the top of their block (as determination of temporal dead zone for them depends on the exact location of the occurrence of the "let"/"const" statement).
This means that the splitter needs to be modified so as to treat every let/const as a splitting boundary. A block that is being split and has a let/const in it can't have said let/const engulfed by a split node; rather, split nodes must end before let/const and then a new split node must start after let/const.
Note that with this approach, the optimistic splitter will work; the change needs to be made in the Splitter, not in the SplitIntoFunctions transformer.
This means that the splitter needs to be modified so as to treat every let/const as a splitting boundary. A block that is being split and has a let/const in it can't have said let/const engulfed by a split node; rather, split nodes must end before let/const and then a new split node must start after let/const.
Note that with this approach, the optimistic splitter will work; the change needs to be made in the Splitter, not in the SplitIntoFunctions transformer.
- relates to
-
JDK-8058884 Reconcile deoptimizing recompilation with code splitting
- Resolved