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

Issue 2484003002: [builtins] implement JSBuiltinReducer for ArrayIteratorNext() (Closed)

Created:
4 years, 1 month ago by caitp
Modified:
4 years, 1 month ago
CC:
Hannes Payer (out of office), ulan, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[builtins] implement JSBuiltinReducer for ArrayIteratorNext() Adds a protector cell to prevent inlining (which will likely lead to deopt loops) when a JSArrayIterator's array transitions from a fast JSArray to a slow JSArray (such as, when the array is touched during iteration in a way which triggers a map transition). Also adds TODO comments relating to the spec update proposed by Dan at https://github.com/tc39/ecma262/pull/724 BUG=v8:5388 R=bmeurer@chromium.org, mstarzinger@chromium.org TBR=hpayer@chromium.org, ulan@chromium.org Committed: https://crrev.com/7f21e67b38a859c5503777a606d68ef3cb449517 Cr-Commit-Position: refs/heads/master@{#40970}

Patch Set 1 #

Patch Set 2 : remove unused JSBuiltinReducer::machine() #

Patch Set 3 : Remove whitespace change that snuck in #

Total comments: 25

Patch Set 4 : fix bug in access-builder.cc + address comments #

Patch Set 5 : Move the [[IteratedObject]] field load after ensuring code can be optimized #

Patch Set 6 : remove unused label #

Patch Set 7 : address comments in AccessBuilder::ForJSArrayIteratorIndex() #

Patch Set 8 : fix compiler error in bootstrapper.cc #

Patch Set 9 : fix it more #

Total comments: 12

Patch Set 10 : next round #

Patch Set 11 : fix mksnapshot #

Patch Set 12 : CheckIf() for ArrayBufferWasNeutered() rather than a branch, which hopefully can be eliminated, and… #

Total comments: 18

Patch Set 13 : bunch of changes #

Total comments: 26

Patch Set 14 : Wednesday comments #

Patch Set 15 : add (some) test coverage, and fix some bugs found by it #

Total comments: 1

Patch Set 16 : disable --always-opt for array-iterator-turbo.js #

Patch Set 17 : also ensure opt isn't disabled #

Patch Set 18 : disable flags in mjsunit.status instead of via FLAGS: #

Patch Set 19 : and fix mjsunit.status.. #

Total comments: 2

Patch Set 20 : rename protector cell for landing #

Patch Set 21 : fix tests when ignition is used #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1178 lines, -39 lines) Patch
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +14 lines, -6 lines 0 comments Download
M src/builtins/builtins-array.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +33 lines, -1 line 0 comments Download
M src/code-stub-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -2 lines 0 comments Download
M src/code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +74 lines, -20 lines 0 comments Download
M src/compiler/access-builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/access-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +53 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +10 lines, -0 lines 0 comments Download
M src/compiler/js-builtin-reducer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +558 lines, -0 lines 0 comments Download
M src/compiler/js-create-lowering.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-create-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +32 lines, -0 lines 0 comments Download
M src/compiler/js-generic-lowering.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/js-operator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-operator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/typer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +12 lines, -0 lines 0 comments Download
M src/compiler/types.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/verifier.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M src/globals.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +19 lines, -0 lines 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +4 lines, -0 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/isolate-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +5 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +11 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +42 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-array.cc View 1 2 3 4 5 6 7 8 9 3 chunks +18 lines, -10 lines 0 comments Download
M src/runtime/runtime-object.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +11 lines, -0 lines 0 comments Download
A test/mjsunit/es6/array-iterator-turbo.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +243 lines, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 90 (54 generated)
caitp
Remove whitespace change that snuck in
4 years, 1 month ago (2016-11-07 22:40:47 UTC) #1
caitp
On 2016/11/07 22:40:47, caitp wrote: > Remove whitespace change that snuck in This isn't quite ...
4 years, 1 month ago (2016-11-08 00:01:10 UTC) #2
caitp
On 2016/11/08 00:01:10, caitp wrote: > On 2016/11/07 22:40:47, caitp wrote: > > Remove whitespace ...
4 years, 1 month ago (2016-11-08 05:26:06 UTC) #3
Benedikt Meurer
Thanks a lot. First round of comments. https://codereview.chromium.org/2484003002/diff/40001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2484003002/diff/40001/src/builtins/builtins-array.cc#newcode2290 src/builtins/builtins-array.cc:2290: invalidate_protector(assembler); The ...
4 years, 1 month ago (2016-11-08 05:29:49 UTC) #5
caitp
Move the [[IteratedObject]] field load after ensuring code can be optimized
4 years, 1 month ago (2016-11-08 06:25:24 UTC) #6
caitp
I think I've addressed all of those first round comments, and fixed the bug that ...
4 years, 1 month ago (2016-11-08 06:27:59 UTC) #7
caitp
https://codereview.chromium.org/2484003002/diff/40001/src/compiler/access-builder.cc File src/compiler/access-builder.cc (right): https://codereview.chromium.org/2484003002/diff/40001/src/compiler/access-builder.cc#newcode568 src/compiler/access-builder.cc:568: TypeCache::Get().kPositiveSafeInteger, On 2016/11/08 05:29:48, Benedikt Meurer wrote: > Actually ...
4 years, 1 month ago (2016-11-08 06:37:36 UTC) #12
Benedikt Meurer
Looking good, thanks. Next round of comments. https://codereview.chromium.org/2484003002/diff/160001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2484003002/diff/160001/src/builtins/builtins-array.cc#newcode2304 src/builtins/builtins-array.cc:2304: Label if_wasfastarray(assembler), ...
4 years, 1 month ago (2016-11-08 08:30:00 UTC) #21
caitp
next round up, ptal when you get some time (try jobs are failing, so taking ...
4 years, 1 month ago (2016-11-08 17:53:07 UTC) #27
caitp
CheckIf() for ArrayBufferWasNeutered() rather than a branch, which hopefully can be eliminated, and serialize IterationKind ...
4 years, 1 month ago (2016-11-08 19:51:28 UTC) #32
Benedikt Meurer
On 2016/11/08 19:51:28, caitp wrote: > CheckIf() for ArrayBufferWasNeutered() rather than a branch, which hopefully ...
4 years, 1 month ago (2016-11-09 05:17:18 UTC) #37
Benedikt Meurer
Camillo please take a look at the holey array iteration. Looks good to me, but ...
4 years, 1 month ago (2016-11-09 05:37:05 UTC) #39
caitp
On 2016/11/09 05:17:18, Benedikt Meurer wrote: > On 2016/11/08 19:51:28, caitp wrote: > > CheckIf() ...
4 years, 1 month ago (2016-11-09 06:20:49 UTC) #40
Benedikt Meurer
On 2016/11/09 06:20:49, caitp wrote: > On 2016/11/09 05:17:18, Benedikt Meurer wrote: > > On ...
4 years, 1 month ago (2016-11-09 06:22:46 UTC) #41
Camillo Bruni
https://codereview.chromium.org/2484003002/diff/210001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2484003002/diff/210001/src/builtins/builtins-array.cc#newcode2322 src/builtins/builtins-array.cc:2322: assembler->WordNotEqual(orig_map, assembler->UndefinedConstant()), nit: assembler->IsUndefined(orig_map) https://codereview.chromium.org/2484003002/diff/210001/src/code-stub-assembler.cc File src/code-stub-assembler.cc (right): https://codereview.chromium.org/2484003002/diff/210001/src/code-stub-assembler.cc#newcode8717 ...
4 years, 1 month ago (2016-11-09 12:03:50 UTC) #42
caitp
as noted on the design doc, there seems to be a problem at some point ...
4 years, 1 month ago (2016-11-09 17:40:16 UTC) #43
Benedikt Meurer
Thanks a lot Caitlin, this is awesome stuff! LGTM from my side once comments addressed. ...
4 years, 1 month ago (2016-11-09 20:00:33 UTC) #48
caitp
so that's it.. i think this probably still needs better test coverage before I CQ ...
4 years, 1 month ago (2016-11-09 20:55:25 UTC) #49
Benedikt Meurer
Having more tests would certainly help, especially in feeding our various fuzzers now. Testing the ...
4 years, 1 month ago (2016-11-10 04:49:55 UTC) #50
caitp
On 2016/11/10 04:49:55, Benedikt Meurer wrote: > Having more tests would certainly help, especially in ...
4 years, 1 month ago (2016-11-10 06:30:20 UTC) #51
Benedikt Meurer
On 2016/11/10 06:30:20, caitp wrote: > On 2016/11/10 04:49:55, Benedikt Meurer wrote: > > Having ...
4 years, 1 month ago (2016-11-10 06:33:40 UTC) #52
caitp
On 2016/11/10 06:33:40, Benedikt Meurer wrote: > On 2016/11/10 06:30:20, caitp wrote: > > On ...
4 years, 1 month ago (2016-11-10 20:24:41 UTC) #55
caitp
https://codereview.chromium.org/2484003002/diff/230001/src/compiler/js-builtin-reducer.cc File src/compiler/js-builtin-reducer.cc (right): https://codereview.chromium.org/2484003002/diff/230001/src/compiler/js-builtin-reducer.cc#newcode244 src/compiler/js-builtin-reducer.cc:244: effect = graph()->NewNode(simplified()->CheckIf(), check, effect, control); CheckIf does a ...
4 years, 1 month ago (2016-11-10 20:27:42 UTC) #56
Benedikt Meurer
> https://codereview.chromium.org/2484003002/diff/270001/test/mjsunit/es6/array-iterator-turbo.js#newcode222 > test/mjsunit/es6/array-iterator-turbo.js:222: assertThrows(() => sum(clone), > TypeError); > for example (of not being ...
4 years, 1 month ago (2016-11-11 06:41:11 UTC) #71
Camillo Bruni
LGTM https://codereview.chromium.org/2484003002/diff/350001/src/builtins/builtins-array.cc File src/builtins/builtins-array.cc (right): https://codereview.chromium.org/2484003002/diff/350001/src/builtins/builtins-array.cc#newcode2345 src/builtins/builtins-array.cc:2345: invalid); Update: Mostly ignore my ramblings below ;) ...
4 years, 1 month ago (2016-11-11 11:27:56 UTC) #72
Benedikt Meurer (Google)
On 2016/11/11 11:27:56, Camillo Bruni wrote: > LGTM > > https://codereview.chromium.org/2484003002/diff/350001/src/builtins/builtins-array.cc > File src/builtins/builtins-array.cc (right): ...
4 years, 1 month ago (2016-11-11 16:39:16 UTC) #73
Benedikt Meurer
https://codereview.chromium.org/2484003002/diff/350001/src/heap/heap.h File src/heap/heap.h (right): https://codereview.chromium.org/2484003002/diff/350001/src/heap/heap.h#newcode169 src/heap/heap.h:169: V(Cell, array_iterator_protector, ArrayIteratorProtector) \ Camillo suggested to rename this ...
4 years, 1 month ago (2016-11-13 18:40:24 UTC) #74
Benedikt Meurer
I'd love to get this in for M56. Can you rename the protector and land ...
4 years, 1 month ago (2016-11-14 04:47:12 UTC) #75
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2484003002/370001
4 years, 1 month ago (2016-11-14 15:12:28 UTC) #78
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/builds/7877) v8_linux64_gyp_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
4 years, 1 month ago (2016-11-14 15:28:22 UTC) #80
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2484003002/390001
4 years, 1 month ago (2016-11-14 15:35:09 UTC) #83
commit-bot: I haz the power
Committed patchset #21 (id:390001)
4 years, 1 month ago (2016-11-14 15:59:00 UTC) #85
Michael Achenbach
On 2016/11/14 15:59:00, commit-bot: I haz the power wrote: > Committed patchset #21 (id:390001) A ...
4 years, 1 month ago (2016-11-14 16:46:12 UTC) #86
caitp
On 2016/11/14 16:46:12, machenbach (slow) wrote: > On 2016/11/14 15:59:00, commit-bot: I haz the power ...
4 years, 1 month ago (2016-11-14 16:47:17 UTC) #87
caitp
On 2016/11/14 16:47:17, caitp wrote: > On 2016/11/14 16:46:12, machenbach (slow) wrote: > > On ...
4 years, 1 month ago (2016-11-14 16:49:22 UTC) #88
commit-bot: I haz the power
4 years, 1 month ago (2016-11-17 22:32:54 UTC) #90
Message was sent while issue was closed.
Patchset 21 (id:??) landed as
https://crrev.com/7f21e67b38a859c5503777a606d68ef3cb449517
Cr-Commit-Position: refs/heads/master@{#40970}

Powered by Google App Engine
This is Rietveld 408576698