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: improve array index property name algorithm #386

Merged
merged 3 commits into from Jul 28, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 4 additions & 5 deletions index.bs
Expand Up @@ -11992,14 +11992,13 @@ Note: Future versions of the ECMAScript specification may define a total order f

The name of each property that appears to exist due to an object supporting indexed properties
is an <dfn id="dfn-array-index-property-name" export>array index property name</dfn>,
which is a property name |P| such that [=Type=](|P|) is String
and for which the following algorithm returns <emu-val>true</emu-val>:
which is a property name |P| for which the following algorithm returns true:

1. Assert: [=Type=](|P|) is String.
1. If [=Type=](|P|) is not String, then return false.
1. Let |i| be [=!=] [=ToUint32=](|P|).
1. Let |s| be [=!=] [=ToString=](|i|).
1. If |s| |P| or |i| = 2<sup>32</sup> − 1, then return <emu-val>false</emu-val>.
1. Return <emu-val>true</emu-val>.
1. If |s| is not equal to |P| or |i| = 2<sup>32</sup> − 1, then return false.
Copy link
Member

Choose a reason for hiding this comment

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

Replace "=" with "is" given the other replacement?

Copy link
Collaborator Author

@tobie tobie Jul 27, 2017

Choose a reason for hiding this comment

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

Figured keeping "=" sort of made sense given these were ints, but then they're not abstract math values but actual ES values, so maybe "is" or "is equal to" is more appropriate.

1. Return true.
</div>

<div algorithm>
Expand Down