Loosen the reentrance rules a bit for parent/child scenarios #62
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.
This PR loosens the reentrance rules to allow
canon lift
to be called from inside a component instance such as when a parent component is called by a child component. For example, in this example:as previously written,
$func2
would clearmay_enter
so that$func1
would trap when called by$child
. With this PR, the idea is that$func1
wouldn't checkmay_enter
becausecalled_as_export
would beFalse
. A more realistic example of when you'd want to do this is that the parent component uses$Core1
and$Core2
to virtualize a filesystem for$Child
, including passing preopens into$Child
's exports.One consequence of this relaxation is that same-component-instance lift+lower would be possible and such cases would need to be compiled more pessimistically (although in a way that only impacted this (rare) case). The PR explains more.