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

Normative: Add the at method to Array, TypedArray, and String #2286

Closed
wants to merge 0 commits into from

Conversation

syg
Copy link
Contributor

@syg syg commented Jan 23, 2021

No description provided.

@syg syg added normative change Affects behavior required to correctly evaluate some ECMAScript source text needs consensus This needs committee consensus before it can be eligible to be merged. pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. has test262 tests proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4. labels Jan 23, 2021
@syg syg requested a review from a team January 23, 2021 01:29
spec.html Outdated
@@ -31728,6 +31744,21 @@ <h1>Properties of the Array Prototype Object</h1>
<p>The Array prototype object is specified to be an Array exotic object to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.</p>
</emu-note>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this busted? There's no </emu-clause> on this and the indentation is off.

Copy link
Member

Choose a reason for hiding this comment

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

GitHub can’t really handle expanding diffs on the web on a file as large as the spec.

spec.html Outdated
<emu-alg>
1. Let _O_ be ? ToObject(*this* value).
1. Let _len_ be ? LengthOfArrayLike(_O_).
1. Let _relativeIndex_ be ? ToInteger(_index_).
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this ToIntegerOrInfinity these days?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Let _relativeIndex_ be ? ToInteger(_index_).
1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_).

spec.html Outdated
1. Let _O_ be ? RequireObjectCoercible(*this* value).
1. Let _S_ be ? ToString(_O_).
1. Let _len_ be the length of _S_.
1. Let _relativeIndex_ be ? ToInteger(_index_).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Let _relativeIndex_ be ? ToInteger(_index_).
1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_).

spec.html Outdated
@@ -31728,6 +31744,21 @@ <h1>Properties of the Array Prototype Object</h1>
<p>The Array prototype object is specified to be an Array exotic object to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.</p>
</emu-note>
Copy link
Member

Choose a reason for hiding this comment

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

GitHub can’t really handle expanding diffs on the web on a file as large as the spec.

spec.html Outdated
<emu-alg>
1. Let _O_ be ? ToObject(*this* value).
1. Let _len_ be ? LengthOfArrayLike(_O_).
1. Let _relativeIndex_ be ? ToInteger(_index_).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Let _relativeIndex_ be ? ToInteger(_index_).
1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_).

spec.html Outdated
1. Let _O_ be the *this* value.
1. Perform ? ValidateTypedArray(_O_).
1. Let _len_ be _O_.[[ArrayLength]].
1. Let _relativeIndex_ be ? ToInteger(_index_).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Let _relativeIndex_ be ? ToInteger(_index_).
1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_).

@ljharb ljharb requested review from michaelficarra, bakkot and a team January 23, 2021 03:17
@ljharb ljharb removed the needs consensus This needs committee consensus before it can be eligible to be merged. label Jan 23, 2021
@ljharb ljharb force-pushed the master branch 3 times, most recently from 3d0c24c to 7a79833 Compare June 29, 2021 02:21
@bakkot
Copy link
Contributor

bakkot commented Sep 13, 2021

We did this in #2493 instead, I guess.

@bakkot bakkot closed this Sep 13, 2021
@ljharb
Copy link
Member

ljharb commented Sep 13, 2021

whoops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text pending stage 4 This proposal has not yet achieved stage 4, but may otherwise be ready to merge. proposal This is related to a specific proposal, and will be closed/merged when the proposal reaches stage 4.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants