RT#102994: State init vars if not set on first pass #1539
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Given the following subroutine:
Previously,
$y
would only be assigned a value if the statement isreached on the first invocation of the static frame. So if
f(1)
is called first,each subsequent
f(0)
call returns(Any)
To address this, added an indicator on the static frame (in
corresponding MoarVM/JVM developments) and modified
p6stateinit
to take a varand check whether it has been assigned to. If the assignment was not
reached in the first pass in the life of a static frame, the is_hll_init
value indicates that it requires HLL assignment the next time it is
encountered.
See RT#102994