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: Name internal slots of iterators consistently #1579

Merged
merged 1 commit into from Nov 18, 2019

Conversation

@shvaikalesh
Copy link
Contributor

shvaikalesh commented Jun 10, 2019

List Iterator

  [[IteratedList]]
- [[ListIteratorNextIndex]]
+ [[ListNextIndex]]

String Iterator

  [[IteratedString]]
- [[StringIteratorNextIndex]]
+ [[StringNextIndex]]

Array Iterator

- [[IteratedObject]]
+ [[IteratedArrayLike]]
- [[ArrayIteratorNextIndex]]
+ [[ArrayLikeNextIndex]]
- [[ArrayIterationKind]]
+ [[ArrayLikeIterationKind]]

Map Iterator

- [[Map]]
+ [[IteratedMap]]
  [[MapNextIndex]]
  [[MapIterationKind]]

Set Iterator

(no changes)

[[IteratedSet]]
[[SetNextIndex]]
[[SetIterationKind]]

RegExp String Iterator

(no changes)

[[IteratingRegExp]]
[[IteratedString]]
[[Global]]
[[Unicode]]
[[Done]]
spec.html Outdated
</td>
</tr>
<tr>
<td>
[[SetIterationKind]]
</td>
<td>
A String value that identifies what is to be returned for each element of the iteration. The possible values are: `"key"`, `"value"`, `"key+value"`. `"key"` and `"value"` have the same meaning.

This comment has been minimized.

Copy link
@shvaikalesh

shvaikalesh Jun 10, 2019

Author Contributor

[[SetIterationKind]] is never "key" because:

The initial value of the Set.prototype.keys property is the same function object as the initial value of the Set.prototype.values property.

@shvaikalesh shvaikalesh force-pushed the shvaikalesh:iterator-slots branch from d126739 to 51b9ac8 Jun 10, 2019
@ljharb ljharb requested review from zenparsing, ljharb, domenic and tc39/ecma262-editors Jun 10, 2019
@shvaikalesh shvaikalesh force-pushed the shvaikalesh:iterator-slots branch from 51b9ac8 to 6e93429 Jul 10, 2019
spec.html Outdated Show resolved Hide resolved
@michaelficarra michaelficarra force-pushed the shvaikalesh:iterator-slots branch from 10c8867 to 96464b9 Nov 8, 2019
@michaelficarra

This comment has been minimized.

Copy link
Member

michaelficarra commented Nov 8, 2019

@shvaikalesh I've rebased this branch and resolved some conflicts. Please check my work.

@shvaikalesh

This comment has been minimized.

Copy link
Contributor Author

shvaikalesh commented Nov 8, 2019

Thank you @michaelficarra! I've also renamed "code unit" to "code point" and tweaked descriptions of some slots.

@ljharb ljharb requested review from syg, michaelficarra, bakkot and tc39/ecma262-editors Nov 9, 2019
@ljharb
ljharb approved these changes Nov 9, 2019
spec.html Outdated Show resolved Hide resolved
@ljharb ljharb self-assigned this Nov 9, 2019
@bakkot
bakkot approved these changes Nov 13, 2019
 - Align [[ArrayLikeIterationKind]] description
 - Add assertion on [[SetIterationKind]] value
 - Correct [[SetIterationKind]] description
 - Correct [[StringNextIndex]] description
 - Remove "to be"
 - "code point" => "code unit"
@ljharb ljharb force-pushed the shvaikalesh:iterator-slots branch from 977a265 to 6245dee Nov 18, 2019
@ljharb ljharb merged commit 6245dee into tc39:master Nov 18, 2019
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
netlify/ecma262-snapshots/deploy-preview Deploy preview ready!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.