Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Issue 1560763002: Add Array support for @@species and subclassing (Closed)

Created:
4 years, 11 months ago by Dan Ehrenberg
Modified:
4 years, 11 months ago
Reviewers:
adamk, Camillo Bruni
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Add Array support for @@species and subclassing This patch implements @@species, guarded behind the --harmony-species flag, on Arrays. Methods which return an Array will instead return the appropriate instance based on the ArraySpeciesCreate algorithm. The algorithm is implemented in C++ to get access to realm information and to implement some Array methods in C++, but it is also accessed from JavaScript through a new runtime function. A couple interactive Octane runs show no performance regression with the flag turned off, but turning --harmony-species on will surely have a significant regression, as Array methods now heavily use ObjectDefineProperty. BUG=v8:4093 LOG=Y R=adamk,cbruni Committed: https://crrev.com/6e96223750a748a7030386cb12904c1163e61d9d Cr-Commit-Position: refs/heads/master@{#33144}

Patch Set 1 #

Patch Set 2 : Some fixes #

Total comments: 38

Patch Set 3 : Changes from Adam's review #

Patch Set 4 : A few formatting fixes #

Total comments: 6

Patch Set 5 : Disable regress test temporarily #

Patch Set 6 : Last couple comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+313 lines, -58 lines) Patch
M src/builtins.cc View 1 2 2 chunks +16 lines, -0 lines 0 comments Download
M src/js/array.js View 11 chunks +48 lines, -34 lines 0 comments Download
M src/js/prologue.js View 1 chunk +0 lines, -13 lines 0 comments Download
M src/js/typedarray.js View 1 2 4 chunks +18 lines, -10 lines 0 comments Download
M src/messages.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 1 chunk +50 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime-array.cc View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/array-species.js View 1 2 3 4 5 1 chunk +156 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 19 (7 generated)
Dan Ehrenberg
4 years, 11 months ago (2016-01-05 22:28:56 UTC) #3
adamk
https://codereview.chromium.org/1560763002/diff/20001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1560763002/diff/20001/src/builtins.cc#newcode461 src/builtins.cc:461: // TODO(littledan): Look up @@species only once, not once ...
4 years, 11 months ago (2016-01-06 00:10:12 UTC) #4
Dan Ehrenberg
Thanks for the detailed review; PTAL https://codereview.chromium.org/1560763002/diff/20001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1560763002/diff/20001/src/builtins.cc#newcode461 src/builtins.cc:461: // TODO(littledan): Look ...
4 years, 11 months ago (2016-01-07 00:42:58 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1560763002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1560763002/60001
4 years, 11 months ago (2016-01-07 00:43:17 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_arm_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_arm_rel/builds/12097)
4 years, 11 months ago (2016-01-07 00:59:20 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1560763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1560763002/80001
4 years, 11 months ago (2016-01-07 01:06:31 UTC) #11
adamk
Looking good, just a few more bits. https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc#newcode1627 src/objects.cc:1627: JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)), Did ...
4 years, 11 months ago (2016-01-07 01:11:04 UTC) #12
Dan Ehrenberg
https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc#newcode1627 src/objects.cc:1627: JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)), On 2016/01/07 at 01:11:04, adamk wrote: > Did ...
4 years, 11 months ago (2016-01-07 01:35:17 UTC) #13
adamk
lgtm https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/1560763002/diff/60001/src/objects.cc#newcode1627 src/objects.cc:1627: JSReceiver::GetFunctionRealm(Handle<JSReceiver>::cast(constructor)), On 2016/01/07 01:35:17, Dan Ehrenberg wrote: > ...
4 years, 11 months ago (2016-01-07 01:38:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1560763002/70011 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1560763002/70011
4 years, 11 months ago (2016-01-07 01:44:42 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:70011)
4 years, 11 months ago (2016-01-07 02:29:56 UTC) #17
commit-bot: I haz the power
4 years, 11 months ago (2016-01-07 02:30:11 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6e96223750a748a7030386cb12904c1163e61d9d
Cr-Commit-Position: refs/heads/master@{#33144}

Powered by Google App Engine
This is Rietveld 408576698