[export-defer] Add cases for namespace operations that triggers evaluation#5035
Open
[export-defer] Add cases for namespace operations that triggers evaluation#5035
Conversation
…cases
Test the observable deferred evaluation semantics of `export defer`
namespace objects. The proposal only inserts EvaluateModuleSync into
[[Get]], so only operations that route through [[Get]] on the namespace
object trigger deferred source evaluation.
Tests use three template families that reflect this classification:
trigger-on-exported/ (4 variants: string-exported, string-not-exported,
then-exported, then-not-exported)
For operations that route through [[Get]] and trigger evaluation when
the key is a deferred-reexported name. The string-not-exported and
then-not-exported variants verify that non-exported keys do NOT trigger
(the [[Get]] returns undefined before reaching
GetOptionalIndirectExportsModuleRequests).
no-trigger-on-exported/ (4 variants: string-exported,
string-not-exported, then-exported, then-not-exported)
For key-sensitive operations that never route through [[Get]].
no-trigger/ (1 variant: no key)
For operations that take no property key or where the key is
irrelevanr, ns evaluation is never triggered.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Test the observable deferred evaluation semantics of
export deferand namespace objects combination. The proposal only insertsEvaluateModuleSyncinto[[Get]], so only operations that route through[[Get]]on the namespace object trigger deferred source evaluation.Tests use three template families that reflect this classification:
trigger-on-exported/(4 variants: string-exported, string-not-exported, then-exported, then-not-exported): For operations that route through[[Get]]and trigger evaluation when the key is a deferred-reexported name. The string-not-exported and then-not-exported variants verify that non-exported keys do NOT trigger (the[[Get]]returnsundefinedbefore reachingGetOptionalIndirectExportsModuleRequests).no-trigger-on-exported/(4 variants: string-exported, string-not-exported, then-exported, then-not-exported): For key-sensitive operations that never route through[[Get]].no-trigger/(1 variant: no key): For operations that take no property key or where the key is irrelevant, evaluation is never triggered.