-
Notifications
You must be signed in to change notification settings - Fork 0
Decorators WIP #1
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
Conversation
The nonterminals: - FunctionExpression - ClassExpression - GeneratorExpression - AsyncGeneratorExpression are all defined with a single RHS involving an optional BindingIdentifier. But AsyncFunctionExpression is defined with two RHSs, one with a BindingIdentifier and one without. (It's been that way since it was introduced in PR tc39#692) I can't see any reason for it to be not like the others.
Published snapshots such as https://262.ecma-international.org/11.0/ include the exact same text. This patch tweaks the text so that the sentence still makes sense even when it’s being read from a snapshot copy. It also hardcodes the link’s target URL so that the link text and destination are always in sync and point to the expected location.
…c39#2189) Co-authored-by: Ryan Duffy <[email protected]> Co-authored-by: Michael Ficarra <[email protected]> Co-authored-by: Kevin Gibbons <[email protected]>
Co-authored-by: Simon Zünd <[email protected]> Co-authored-by: Mathias Bynens <[email protected]>
Both S and R are Strings, so either both or neither should be asserted in the steps. I chose neither.
tc39#2116) Co-authored-by: Kevin Gibbons <[email protected]> Co-authored-by: Shu-yu Guo <[email protected]>
…tc39#2253) ... using the format established in PR tc39#1914.
The spec has only one occurrence of: "For each ... that satisfies ..." but six of: "For each ... such that ..." so change the former to the latter.
... in the only occurrence of "For each non-negative integer", to match the 4 existing occurrences of "For each integer".
The form "For each [element] of [list], in original key insertion order" (or "... original insertion order") is weird because it implies that it's not enough to know the order of the elements in the List, you also have to know the order that they were inserted into the List. But in fact, that's not necessary: in every case where this form is used, the insertion order is the *same* as the List order, because insertions only happen via appending to the List. Map.prototype.forEach: Iterates over _map_.[[MapData]], whose only inserts are appends, in Map.prototype.set. Set.prototype.forEach: Iterates over _set_.[[SetData]], whose only inserts are appends, in Set.prototype.add. TriggerPromiseReactions: Iterates over _reactions_, which is _promise_.[[PromiseFulfillReactions]] or _promise_.[[PromiseRejectReactions]], whose only inserts are appends, in PerformPromiseThen.
…, private methods & getters/setters This includes changes from https://tc39.es/proposal-class-fields/. This includes changes from https://tc39.es/proposal-private-methods/. This includes changes from https://tc39.es/proposal-static-class-features/. Co-authored-by: Ms2ger <[email protected]> Co-authored-by: Ujjwal Sharma <[email protected]> Co-authored-by: Caio Lima <[email protected]> Co-authored-by: Michael Dyck <[email protected]> Co-authored-by: Kevin Gibbons <[email protected]> Co-authored-by: Jordan Harband <[email protected]>
spec.html
Outdated
<emu-clause id="sec-map-specification-type"> | ||
<h1>The Map Specification Types</h1> | ||
<p>The <dfn>Map</dfn> type is used to explain the evaluation of key-value based data structures, such as the metadata data structure built up by decorators (see <emu-xref href="#sec-metadata-record-specification-type"></emu-xref>). Values of the Map type are ordered sequences of key/value pairs containing individual values. These sequences may be of any length. The elements of a map may be randomly accessed using key-based indices. For notational convenience a dynamic-key syntax can be used to access Map elements. For example, _publicMetadata_[*"key"*] is shorthand for saying the value associated with *"key"* in the Map _publicMetadata_. If the map does not have a value associated with that key, then it returns ~empty~.</p> | ||
|
||
<p>Maps can be iterated like lists, and are iterated as key/value pairs. If no order is specified, then elements are iterated in the order they were inserted.</p> | ||
</emu-clause> |
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.
why do we need this type at all? couldn't we make a null object (one that's never observed to exist) and use that for the lookups?
[[DecoratorInitializers]] | ||
</td> | ||
<td> | ||
a list of ECMAScript function objects, or ~empty~ |
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.
a list of ECMAScript function objects, or ~empty~ | |
a List of ECMAScript function objects, or ~empty~ |
any reason not to default it to an empty List?
[[FinisherInitializers]] | ||
</td> | ||
<td> | ||
a list of ECMAScript function objects, or ~empty~ |
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.
a list of ECMAScript function objects, or ~empty~ | |
a List of ECMAScript function objects, or ~empty~ |
same question
[[Initializers]] | ||
</td> | ||
<td> | ||
a list of ECMAScript function objects, or ~empty~ |
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.
a list of ECMAScript function objects, or ~empty~ | |
a List of ECMAScript function objects, or ~empty~ |
here also
484b92d
to
f004418
Compare
Please check that I've made the correct replacement!
Please check that I've made the correct replacements
(otherwise _metadataObjForKey_ wouldn't always be defined subequently)
or at least, not one that a function should be returning.
so that it's defined for the call to ClassElementEvaluation
Every call to CreateDecoratorContextObject assumes that this parameter is there. (Of course, you'll need to add steps to *do* something with it.)
... to conform to what it accepts.
suggested changes
Moved to tc39#2417 |
No description provided.