From 617dad0ec7ab857d03dff8a432267a0df1b67732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Ribaudo?= Date: Wed, 27 Mar 2024 17:02:53 +0100 Subject: [PATCH] Update index.html --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 1fe371c..f0cd255 100644 --- a/index.html +++ b/index.html @@ -2628,7 +2628,7 @@

Stage 2 Draft / March 22, 2024

Deferred Imports Evaluation

+

Stage 2 Draft / March 27, 2024

Deferred Imports Evaluation

10 Ordinary and Exotic Objects Behaviours

@@ -2683,7 +2683,7 @@

10.4.6 Module Namespace Exotic Objects

10.4.6.8 [[Get]] ( P, Receiver )

The [[Get]] internal method of a module namespace exotic object O takes arguments P (a property key) and Receiver (an ECMAScript language value) and returns either a normal completion containing an ECMAScript language value or a throw completion. It performs the following steps when called:

-
  1. If P is a Symbol, then
    1. Return ! OrdinaryGet(O, P, Receiver).
  2. Let exports be O.[[Exports]].
  3. If exports does not contain P, return undefined.
  4. Let m be O.[[Module]].
  5. If m is not a Cyclic Module Record, or both m.[[Status]] is linked and AnyDependencyNeedsAsyncEvaluation(m) is false, then
    1. Perform ? EvaluateSync(m).
  6. Let binding be m.ResolveExport(P).
  7. Assert: binding is a ResolvedBinding Record.
  8. Let targetModule be binding.[[Module]].
  9. Assert: targetModule is not undefined.
  10. If binding.[[BindingName]] is namespace, then
    1. Return GetModuleNamespace(targetModule).
  11. Let targetEnv be targetModule.[[Environment]].
  12. If targetEnv is empty, throw a ReferenceError exception.
  13. Return ? targetEnv.GetBindingValue(binding.[[BindingName]], true).
+
  1. If P is a Symbol, then
    1. Return ! OrdinaryGet(O, P, Receiver).
  2. Let m be O.[[Module]].
  3. If m is not a Cyclic Module Record, or both m.[[Status]] is linked and AnyDependencyNeedsAsyncEvaluation(m) is false, then
    1. Perform ? EvaluateSync(m).
  4. Let exports be O.[[Exports]].
  5. If exports does not contain P, return undefined.
  6. Let m be O.[[Module]].
  7. Let binding be m.ResolveExport(P).
  8. Assert: binding is a ResolvedBinding Record.
  9. Let targetModule be binding.[[Module]].
  10. Assert: targetModule is not undefined.
  11. If binding.[[BindingName]] is namespace, then
    1. Return GetModuleNamespace(targetModule).
  12. Let targetEnv be targetModule.[[Environment]].
  13. If targetEnv is empty, throw a ReferenceError exception.
  14. Return ? targetEnv.GetBindingValue(binding.[[BindingName]], true).
Note 1

ResolveExport is side-effect free. Each time this operation is called with a specific exportName, resolveSet pair as arguments it must return the same result. An implementation might choose to pre-compute or cache the ResolveExport results for the [[Exports]] of each module namespace exotic object.