Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorial: Eliminate 'bare' uses of "completion" #2682

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Mar 4, 2022

... i.e., uses of "completion" that aren't preceded by "normal", "abrupt", "throw", etc., and aren't just using it in its usual English sense. This includes 8 occurrences of "completion value".

I left the 'Meaning' for [[Type]] ("The type of completion that occurred") as it's maybe the usual English sense. (A Completion Record doesn't "occur".) It's debatable though.

I handled the occurrences of "completion value" in various ways, depending on the context.

In cleaning up "completion value" in the description of HostImportModuleDynamically, I merged 2 list items, which is a bit surprising, so look at that one carefully.

In the Annex F cases of "completion value", I also changed 3 occurrences of a normal completion whose value is ~empty~ to a normal completion containing ~empty~.

This is a follow-up to #2547, prompted by this discussion.

@@ -47823,7 +47821,7 @@ <h1>Additions and Changes That Introduce Incompatibilities with Prior Editions</
<p><emu-xref href="#sec-assignment-operators-static-semantics-early-errors"></emu-xref>: In ECMAScript 2015, strict mode code containing an assignment to an immutable binding such as the function name of a |FunctionExpression| does not produce an early error. Instead it produces a runtime error.</p>
<p><emu-xref href="#sec-block"></emu-xref>: In ECMAScript 2015, a |StatementList| beginning with the token let followed by the input elements |LineTerminator| then |Identifier| is the start of a |LexicalDeclaration|. In previous editions, automatic semicolon insertion would always insert a semicolon before the |Identifier| input element.</p>
<p><emu-xref href="#sec-expression-statement"></emu-xref>: In ECMAScript 2015, a |StatementListItem| beginning with the token `let` followed by the token `[` is the start of a |LexicalDeclaration|. In previous editions such a sequence would be the start of an |ExpressionStatement|.</p>
<p><emu-xref href="#sec-if-statement-runtime-semantics-evaluation"></emu-xref>: In ECMAScript 2015, the normal completion value of an |IfStatement| is never the value ~empty~. If no |Statement| part is evaluated or if the evaluated |Statement| part produces a normal completion whose value is ~empty~, the completion value of the |IfStatement| is *undefined*.</p>
<p><emu-xref href="#sec-if-statement-runtime-semantics-evaluation"></emu-xref>: In ECMAScript 2015, the normal result of an |IfStatement| is never the value ~empty~. If no |Statement| part is evaluated or if the evaluated |Statement| part produces a normal completion containing ~empty~, the result of the |IfStatement| is *undefined*.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little ambiguous, in the way that "normally containing" was ambiguous in the first draft of #2547, but since this is just non-normative exposition I'm fine with it.

Copy link
Collaborator Author

@jmdyck jmdyck Mar 4, 2022

Choose a reason for hiding this comment

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

Yup, that's roughly how I felt about it too.

@bakkot bakkot added the ready to merge Editors believe this PR needs no further reviews, and is ready to land. label Mar 8, 2022
(2 uses of "completion" and 8 uses of "completion value")
@ljharb ljharb force-pushed the bare_completion branch from f0342b6 to 7913cea Compare March 8, 2022 16:26
@ljharb ljharb merged commit 7913cea into tc39:main Mar 8, 2022
@jmdyck jmdyck deleted the bare_completion branch March 9, 2022 23:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial change ready to merge Editors believe this PR needs no further reviews, and is ready to land.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants