-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: define and use improved intrinsics notation #1376
Conversation
e4af1e5
to
87e4e43
Compare
Rather than adding (for instance) |
@jmdyck there are potentially other specs that reference the original intrinsic name. |
The only such specs should be HTML, Web IDL, and Streams, which are all living and can be updated. So indeed, if you want to remove all |
@domenic definitely; my hope is to land this, then I'll go file PRs on those specs to update them, and then I can come back here and file a final one to "clean up" all the no-longer-necessary explicit intrinsics. |
They can continue to do so, as I didn't suggest removing the original names. I specifically said add the new name to column 1. |
What's the status here? |
spec.html
Outdated
@@ -1689,7 +1689,7 @@ <h2>[[Construct]] ( )</h2> | |||
<emu-clause id="sec-well-known-intrinsic-objects"> | |||
<h1>Well-Known Intrinsic Objects</h1> | |||
<p>Well-known intrinsics are built-in objects that are explicitly referenced by the algorithms of this specification and which usually have realm-specific identities. Unless otherwise specified each intrinsic object actually corresponds to a set of similar objects, one per realm.</p> | |||
<p>Within this specification a reference such as %name% means the intrinsic object, associated with the current realm, corresponding to the name. Determination of the current realm and its intrinsics is described in <emu-xref href="#sec-execution-contexts"></emu-xref>. The well-known intrinsics are listed in <emu-xref href="#table-7"></emu-xref>.</p> | |||
<p>Within this specification a reference such as %name% means the intrinsic object, associated with the current realm, corresponding to the name. A reference such as %name.a.b% means, as if the "b" property of the "a" property of the intrinsic object %name% was accessed prior to any ECMAScript code being evaluated. Determination of the current realm and its intrinsics is described in <emu-xref href="#sec-execution-contexts"></emu-xref>. The well-known intrinsics are listed in <emu-xref href="#table-7"></emu-xref>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<p>Within this specification a reference such as %name% means the intrinsic object, associated with the current realm, corresponding to the name. A reference such as %name.a.b% means, as if the "b" property of the "a" property of the intrinsic object %name% was accessed prior to any ECMAScript code being evaluated. Determination of the current realm and its intrinsics is described in <emu-xref href="#sec-execution-contexts"></emu-xref>. The well-known intrinsics are listed in <emu-xref href="#table-7"></emu-xref>.</p> | |
<p>Within this specification a reference such as %name% means the intrinsic object, associated with the current realm, corresponding to the name. A reference such as %name.a.b% means the object that is the "b" property of the object that is the "a" property of the intrinsic object %name%, before any ECMAScript code is evaluated. Determination of the current realm and its intrinsics is described in <emu-xref href="#sec-execution-contexts"></emu-xref>. The well-known intrinsics are listed in <emu-xref href="#table-7"></emu-xref>.</p> |
Tangential thought for the future (not a problem for this PR):
Note that if you remove table rows for things that can be expressed as You could resolve it either way (i.e., pick either to become the "true" definition), but you'd need to alter the other so that it no longer sounds like a definition. |
CreateIntrinsics creates |
In Editorial commit f1b22ef (tc39#1376): - "%<var>NativeError</var>Prototype%" changed to "%NativeErrorPrototype%", which doesn't make sense, because there's no such intrinsic. - "%<var>TypedArray</var>Prototype%" changed to "%TypedArrayPrototype%", which would be a change in semantics, which shouldn't happen in an Editorial commit. So these changes were presumably mistakes.
Commit f1b22ef (tc39#1376) changed lots of intrinsic-names from old-style to new-style. But these two should have stayed old-style, so switch them back. (See tc39#1636 (comment))
In PR tc39#1571: https://github.com/tc39/ecma262/pull/1571/files#diff-3540caefa502006d8a33cb1385720803L19940 removed the step "Assert: _constructorInfo_ is not an abrupt completion." but didn't insert the equivalent "!" on the previous line. https://github.com/tc39/ecma262/pull/1571/files#diff-3540caefa502006d8a33cb1385720803L23362 removed a ReturnIfAbrupt step, but didn't insert the equivalent '?' in the previous line. --- Commit f1b22ef (tc39#1376) changed 2 occurrences of "%AsyncIteratorPrototype% to "%AsyncIterator.prototype% but the latter assumes a well-known intrinsic named "%AsyncIterator%", which doesn't exist. This commit changes them back. --- Commit f1b22ef (tc39#1376) changed lots of intrinsic-names from old-style to new-style. But these two should have stayed old-style, so switch them back. (See tc39#1636 (comment))
In Editorial commit f1b22ef (tc39#1376): - "%<var>NativeError</var>Prototype%" changed to "%NativeErrorPrototype%", which doesn't make sense, because there's no such intrinsic. - "%<var>TypedArray</var>Prototype%" changed to "%TypedArrayPrototype%", which would be a change in semantics, which shouldn't happen in an Editorial commit. So these changes were presumably mistakes.
Follows tc39/ecma262#1376, and prevents problems in the future when the non-dotted forms are deleted.
Follows tc39/ecma262#1376, and prevents problems in the future when the non-dotted forms are deleted.
Follows tc39/ecma262#1376, and prevents problems in the future when the non-dotted forms are deleted. Closes #897.
Since tc39/ecma262#1376, the dotted form of intrinsic notation is preferred. Additionally, tc39/ecma262#2056 intends to remove these legacy intrinsics, once it is non-normative to do so. HTML has already been updated to no longer use them.
Since tc39/ecma262#1376, the dotted form of intrinsic notation is preferred. Additionally, tc39/ecma262#2056 intends to remove these legacy intrinsics, once it is non-normative to do so. HTML has already been updated to no longer use them.
Since tc39/ecma262#1376, the dotted form of intrinsic notation is preferred. Additionally, tc39/ecma262#2056 intends to remove these legacy intrinsics, once it is non-normative to do so. HTML has already been updated to no longer use them.
Follows tc39/ecma262#1376, and prevents problems in the future when the non-dotted forms are deleted.
Per editors' group discussion, separating this out from #1314.
The intention here is to prevent unbounded future growth of the intrinsics table, while also making intrinsic references slightly more readable/intuitive by making them more closely mirror the JS you'd use to access them (in an unmodified realm).
This ideally would be coupled with a change in ecmarkup to auto-link intrinsic syntax to the value in question, for even easier consumption.
Closes #1377. Closes #1105.