diff --git a/spec.html b/spec.html index a1b4b63..d58c7fe 100644 --- a/spec.html +++ b/spec.html @@ -470,6 +470,7 @@

InnerModuleEvaluation( _module_, _stack_, _index_ )

1. For each String _required_ that is an element of _module_.[[RequestedModules]], do 1. Let _requiredModule_ be ! HostResolveImportedModule(_module_, _required_). 1. NOTE: Instantiate must be completed successfully prior to invoking this method, so every requested module is guaranteed to resolve successfully. + 1. Let _cycle_ be *true* if _requiredModule_.[[Status]] is `"evaluating"`, and *false* otherwise. 1. Set _index_ to ? InnerModuleEvaluation(_requiredModule_, _stack_, _index_). 1. If _requiredModule_ is a Cyclic Module Record, then 1. Assert: _requiredModule_.[[Status]] is either `"evaluating"`, `"evaluating-async"` or `"evaluated"`. @@ -478,9 +479,10 @@

InnerModuleEvaluation( _module_, _stack_, _index_ )

1. Set _module_.[[DFSAncestorIndex]] to min(_module_.[[DFSAncestorIndex]], _requiredModule_.[[DFSAncestorIndex]]). 1. Otherwise, set _requiredModule_ to GetCycleRoot(_requiredModule_). 1. If _requiredModule_.[[EvaluationError]] is not *undefined*, return _module_.[[EvaluationError]]. - 1. If _requiredModule_.[[Async]] is *true*, or _requiredModule_.[[PendingAsyncDependencies]] is not 0, then - 1. Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1. - 1. Append _module_ to _requiredModule_.[[AsyncParentModules]]. + 1. If _cycle_ is *false*, + 1. If either _requiredModule_.[[Async]] is *true*, or _requiredModule_.[[PendingAsyncDependencies]] is not 0, then + 1. Set _module_.[[PendingAsyncDependencies]] to _module_.[[PendingAsyncDependencies]] + 1. + 1. Append _module_ to _requiredModule_.[[AsyncParentModules]]. 1. Perform ? _module_.ExecuteModule(). 1. If _module_.[[PendingAsyncDependencies]] is 0, then 1. Perform ! ExecuteCyclicModule(_module_).