Skip to content
This repository has been archived by the owner on Aug 29, 2021. It is now read-only.

update spec.html to current spec #141

Merged
merged 4 commits into from
Jul 16, 2020
Merged

update spec.html to current spec #141

merged 4 commits into from
Jul 16, 2020

Conversation

codehag
Copy link
Collaborator

@codehag codehag commented May 19, 2020

Hi folks,

This is related to my issue #139 where I was having a hard time seeing what was different between the proposal and the existing spec. There are a couple of changes that have happened in the last year which were not merged into this spec. I tried to get all of them.

The biggest one is that TopLevelEvaluationJob no longer exists (https://tc39.es/proposal-top-level-await/#sec-toplevelmoduleevaluationjob) removed in (https://github.com/tc39/ecma262/pull/1597/files). It is not in this pull request either, because I wasn't sure which part of thee spec this would now touch.

the other significant change is https://tc39.es/proposal-top-level-await/#sec-source-text-module-record-execute-module -- in the original, the change was quite small, but now it is larger. I don't know if this is accurate.

I think we could do with some tooling to make these diffs easier... Looking forward to peoples comments.

You can see the "diff" from the current to the version in this repo here: https://github.com/codehag/proposal-top-level-await/pull/1/files

@littledan
Copy link
Member

The text around TopLevelModuleEvaluationJob is replaced by logic in HTML's JS module loading. See #45 . @Ms2ger , could you review this patch?

@Ms2ger
Copy link
Collaborator

Ms2ger commented May 20, 2020

Thanks for the PR, I'll try to look in detail soon.

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved

<p>The InnerModuleEvaluation abstract operation is used by Evaluate to perform the actual evaluation process for the Cyclic Module Record _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestoreIndex]] fields, are used the same way as in InnerModuleLinking.</p>
<h1>InnerModuleEvaluation ( _module_, _stack_, _index_ )</h1>
<p>The abstract operation InnerModuleEvaluation takes arguments _module_ (a Source Text Module Record), _stack_, and _index_. It is used by Evaluate to perform the actual evaluation process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestorIndex]] fields, are used the same way as in InnerModuleLinking. It performs the following steps when called:</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upstream bug, it seems: module need not be a Source Text Module Record.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do the change there first?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
@codehag codehag force-pushed the update-spec branch 3 times, most recently from ec38e43 to 19d2a2a Compare May 27, 2020 11:27
</emu-clause>

<emu-clause id="sec-toplevelmoduleevaluationjob" aoid="TopLevelModuleEvaluationJob">
Copy link
Collaborator Author

@codehag codehag May 27, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is moved to the bottom, unchanged, from line 1032

@codehag codehag requested a review from Ms2ger June 9, 2020 09:21
Copy link
Collaborator

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the first commit.

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved

<p>The InnerModuleEvaluation abstract operation is used by Evaluate to perform the actual evaluation process for the Cyclic Module Record _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestoreIndex]] fields, are used the same way as in InnerModuleLinking.</p>
<h1>InnerModuleEvaluation ( _module_, _stack_, _index_ )</h1>
<p>The abstract operation InnerModuleEvaluation takes arguments _module_ (a Source Text Module Record), _stack_, and _index_. It is used by Evaluate to perform the actual evaluation process for _module_, as well as recursively on all other modules in the dependency graph. The _stack_ and _index_ parameters, as well as _module_'s [[DFSIndex]] and [[DFSAncestorIndex]] fields, are used the same way as in InnerModuleLinking. It performs the following steps when called:</p>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please

spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
spec.html Outdated Show resolved Hide resolved
@codehag
Copy link
Collaborator Author

codehag commented Jul 13, 2020

sorry it took a while to do those @Ms2ger -- do you have further comments?

spec.html Outdated
@@ -1022,36 +1022,6 @@ <h1>ExecuteModule ( <ins>[ _capability_ ]</ins> ) Concrete Method</h1>
</emu-clause>
</emu-clause>

<emu-clause id="sec-toplevelmoduleevaluationjob" aoid="TopLevelModuleEvaluationJob">
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be that this was moved into html but I don't know the full context: https://html.spec.whatwg.org/#fetch-the-descendants-of-and-link-a-module-script

@Ms2ger Ms2ger merged commit 8e2e70e into tc39:master Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants