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: Ensure that TypedArray.prototype.fill does one coercion #856

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

littledan
Copy link
Member

Previously, TypedArray.prototype.fill failed to coerce its value
argument multiple in the beginning of the definition, instead coercing
it when writing into the TypedArray each time. This patch tweaks
the definition to perform the coercion once.

Fixes #855

Previously, TypedArray.prototype.fill failed to coerce its value
argument multiple in the beginning of the definition, instead coercing
it when writing into the TypedArray each time. This patch tweaks
the definition to perform the coercion once.
littledan added a commit to littledan/test262 that referenced this pull request Mar 22, 2017
The change is proposed in tc39/ecma262#856
as a fix to tc39/ecma262#855

Here, the ToNumber coercion is done only once, rather than on each
iteration. It does not appear that there were previously any
tests against repeated coercion for this parameter previously.

Tested this test against V8, which failed, as V8 implements the
current spec rather than the proposed one.
@littledan littledan added needs consensus This needs committee consensus before it can be eligible to be merged. normative change Affects behavior required to correctly evaluate some ECMAScript source text labels Mar 22, 2017
@leobalter
Copy link
Member

this reached consensus in March 22nd at the last TC39 meeting.

@leobalter leobalter removed the needs consensus This needs committee consensus before it can be eligible to be merged. label Mar 27, 2017
@leobalter
Copy link
Member

@bterlson should we have a "has consensus" label for unmerged PRs/issues?

leobalter pushed a commit to tc39/test262 that referenced this pull request Mar 27, 2017
The change is proposed in tc39/ecma262#856
as a fix to tc39/ecma262#855

Here, the ToNumber coercion is done only once, rather than on each
iteration. It does not appear that there were previously any
tests against repeated coercion for this parameter previously.

Tested this test against V8, which failed, as V8 implements the
current spec rather than the proposed one.
@ljharb ljharb added the has consensus This has committee consensus. label Mar 27, 2017
@ljharb
Copy link
Member

ljharb commented Mar 27, 2017

@leobalter good idea; i took the liberty to make one

@bterlson bterlson merged commit e76322b into tc39:master Mar 31, 2017
kisg pushed a commit to paul99/v8mips that referenced this pull request Apr 4, 2017
Update according to new spec change at
tc39/ecma262#856

- Call ToNumber only once in BUILTIN
- Remove unused FillNumberSlowPath
- FillImpl assumes obj_value->IsNumber() is true
- Update test

Bug:v8:5929,chromium:702902

Change-Id: Ic83e6754d043582955b81c76e68f95e1c6b7e901
Reviewed-on: https://chromium-review.googlesource.com/465646
Reviewed-by: Daniel Ehrenberg <littledan@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44373}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. has test262 tests normative change Affects behavior required to correctly evaluate some ECMAScript source text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants