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: Recast NormalCompletion + ThrowCompletion #2386

Merged
merged 1 commit into from
Aug 18, 2021

Conversation

jmdyck
Copy link
Collaborator

@jmdyck jmdyck commented Apr 14, 2021

spec.html Outdated
<h1>NormalCompletion</h1>
<p>The abstract operation NormalCompletion with a single _argument_, such as:</p>
<h1>NormalCompletion ( _value_ )</h1>
<p>The abstract operation NormalCompletion takes argument _value_ (an ECMAScript language value or ~empty~). It performs the following steps when called:</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<p>The abstract operation NormalCompletion takes argument _value_ (an ECMAScript language value or ~empty~). It performs the following steps when called:</p>
<p>The abstract operation NormalCompletion takes argument _value_. It performs the following steps when called:</p>

Given that the type isn't accurate, best to leave it out for now, I think (even though the inaccuracy exists elsewhere).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Urgh, okay, done.

Copy link
Member

Choose a reason for hiding this comment

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

image

How is it inaccurate?

Copy link
Contributor

Choose a reason for hiding this comment

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

Normal completions hold values which are not ES language values or ~empty~. The table you've screenshotted is wrong; that's the "elsewhere" I was referring to.

(For example, PropertyBindingInitialization returns a completion record holding a list. jmdyck has a larger list of examples here.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For explicit calls to NormalCompletion, I suspect an ECMAScript language value or ~empty~ actually is accurate. However, there are also implicit calls to NormalCompletion, and those get us into issue #496. I.e. the spec is inconsistent, and one possible resolution of that inconsistency is that the [[Value]] field of a completion record can be many more things than just an ECMAScript language value or ~empty~.

@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
@jmdyck jmdyck force-pushed the FooCompletion_ao branch from 0ec8ba8 to 68b2b91 Compare July 18, 2021 03:22
@jmdyck
Copy link
Collaborator Author

jmdyck commented Jul 18, 2021

force-pushed to:

  • rebase to master,
  • resolve merge conflicts from PR 545 (use structured headers), and
  • squash commits into one.

@bakkot bakkot added the editor call to be discussed in the next editor call label Aug 16, 2021
@bakkot bakkot added ready to merge Editors believe this PR needs no further reviews, and is ready to land. and removed editor call to be discussed in the next editor call labels Aug 18, 2021
... as regular abstract operations.

See
- tc39#1142 (comment) and following
- tc39#2384 (comment) and following
@ljharb ljharb merged commit f72dd16 into tc39:master Aug 18, 2021
mathiasbynens pushed a commit to mathiasbynens/ecma262 that referenced this pull request Oct 18, 2021
... as regular abstract operations.

See
- tc39#1142 (comment) and following
- tc39#2384 (comment) and following
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.

5 participants