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

Issue 2645313003: [async-iteration] implement Async-from-Sync Iterator (Closed)

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

Description

[async-iteration] implement Async-from-Sync Iterator Introduce a new Object to allow GetIterator("async") to function when the iterable does not have a Symbol.asyncIterator method. This patch has been split out from https://codereview.chromium.org/2622833002/ and incorporates test cases. BUG=v8:5855, v8:4483 R=jgruber@chromium.org, rmcilroy@chromium.org, neis@chromium.org TBR=hpayer@chromium.org, bmeurer@chromium.org Review-Url: https://codereview.chromium.org/2645313003 Cr-Commit-Position: refs/heads/master@{#43419} Committed: https://chromium.googlesource.com/v8/v8/+/0423341034c767d91128c9fd68e3f51e60359c1c

Patch Set 1 #

Patch Set 2 : Don't change instantiation of CallStubR template, not needed in this patchset #

Patch Set 3 : [async-iteration] implement Async-from-Sync Iterator #

Patch Set 4 : [async-iteration] implement Async-from-Sync Iterator #

Patch Set 5 : attempt #3 to fix merge conflicts #

Total comments: 13

Patch Set 6 : Rebased + added bytecode generator tests #

Patch Set 7 : [async-iteration] implement Async-from-Sync Iterator #

Total comments: 1

Patch Set 8 : Refactor #1 #

Patch Set 9 : Add a MakeTypeError helper #

Total comments: 1

Patch Set 10 : update bytecode expectations #

Patch Set 11 : Move closure creation to a helper func #

Total comments: 6

Patch Set 12 : [async-iteration] implement Async-from-Sync Iterator #

Patch Set 13 : [async-iteration] implement Async-from-Sync Iterator #

Total comments: 30

Patch Set 14 : Remove "incompatible-receiver" branches that are unreachable, and update bytecode expectations #

Patch Set 15 : remove more unused stuff #

Patch Set 16 : Re-add exception + add tests for it #

Patch Set 17 : rebase #

Total comments: 33

Patch Set 18 : more stuff #

Total comments: 23

Patch Set 19 : Refactor + add more tests #

Total comments: 9

Patch Set 20 : rebased #

Patch Set 21 : nits #

Patch Set 22 : cleanmerge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3087 lines, -20 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M src/ast/ast-types.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 4 chunks +56 lines, -0 lines 0 comments Download
M src/builtins/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +12 lines, -1 line 0 comments Download
A src/builtins/builtins-async-iterator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +326 lines, -0 lines 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 20 21 3 chunks +16 lines, -0 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 20 21 1 chunk +5 lines, -0 lines 0 comments Download
M src/compiler/code-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/code-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +4 lines, -0 lines 0 comments Download
M src/compiler/types.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +1 line, -0 lines 0 comments Download
M src/contexts.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/deoptimizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +13 lines, -0 lines 0 comments Download
M src/factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -0 lines 0 comments Download
M src/factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +10 lines, -0 lines 0 comments Download
M src/heap/objects-visiting.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/interpreter-intrinsics.h View 1 2 3 4 5 1 chunk +16 lines, -15 lines 0 comments Download
M src/interpreter/interpreter-intrinsics.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +38 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 20 4 chunks +29 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 20 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-body-descriptors-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M src/objects-debug.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +9 lines, -0 lines 0 comments Download
M src/objects-inl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +5 lines, -0 lines 0 comments Download
M src/runtime/runtime-internal.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +12 lines, -4 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1803 lines, -0 lines 0 comments Download
M test/cctest/interpreter/generate-bytecode-expectations.cc View 1 2 3 4 5 9 chunks +11 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 4 5 1 chunk +39 lines, -0 lines 0 comments Download
A test/mjsunit/harmony/async-from-sync-iterator.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +670 lines, -0 lines 0 comments Download

Messages

Total messages: 99 (69 generated)
caitp
Hi, PTAL This is another chunk of code split out from the big WIP CL, ...
3 years, 11 months ago (2017-01-23 17:34:29 UTC) #4
jgruber
A couple of DBC, only looked at builtins-async. https://codereview.chromium.org/2645313003/diff/80001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/80001/src/builtins/builtins-async-iterator.cc#newcode59 src/builtins/builtins-async-iterator.cc:59: Node* ...
3 years, 11 months ago (2017-01-24 16:48:40 UTC) #19
caitp
I'll address the other comments in a bit, thanks for taking a look https://codereview.chromium.org/2645313003/diff/80001/src/builtins/builtins-async-iterator.cc File ...
3 years, 11 months ago (2017-01-24 16:58:36 UTC) #20
rmcilroy
interpreter/ changes LGTM, I didn't look at the rest though.
3 years, 11 months ago (2017-01-25 11:07:37 UTC) #21
caitp
On 2017/01/25 11:07:37, rmcilroy wrote: > interpreter/ changes LGTM, I didn't look at the rest ...
3 years, 10 months ago (2017-02-14 22:29:40 UTC) #24
caitp
So, for-await-of landed, this CL is next in line and ready for a proper look. ...
3 years, 10 months ago (2017-02-15 19:48:49 UTC) #29
caitp
https://codereview.chromium.org/2645313003/diff/120001/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden File test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden (right): https://codereview.chromium.org/2645313003/diff/120001/test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden#newcode53 test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden:53: B(CallJSRuntime), U8(%UnknownIntrinsicIndex), R(5), U8(1), Should be fixed by https://codereview.chromium.org/2695323002, ...
3 years, 10 months ago (2017-02-15 20:00:40 UTC) #30
caitp
https://codereview.chromium.org/2645313003/diff/80001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/80001/src/builtins/builtins-async-iterator.cc#newcode59 src/builtins/builtins-async-iterator.cc:59: Node* const fast_iter_result_map = On 2017/01/24 16:48:39, jgruber wrote: ...
3 years, 10 months ago (2017-02-15 22:18:01 UTC) #41
Benedikt Meurer
https://codereview.chromium.org/2645313003/diff/200001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/200001/src/builtins/builtins-async-iterator.cc#newcode16 src/builtins/builtins-async-iterator.cc:16: class ValueUnwrapContext { Can we wrap these helpers into ...
3 years, 10 months ago (2017-02-16 05:16:39 UTC) #44
caitp
https://codereview.chromium.org/2645313003/diff/200001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/200001/src/builtins/builtins-async-iterator.cc#newcode16 src/builtins/builtins-async-iterator.cc:16: class ValueUnwrapContext { On 2017/02/16 05:16:38, Benedikt Meurer wrote: ...
3 years, 10 months ago (2017-02-16 14:25:12 UTC) #47
caitp
https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async-iterator.cc#newcode175 src/builtins/builtins-async-iterator.cc:175: Node* const error = This is unreachable in the ...
3 years, 10 months ago (2017-02-16 14:55:57 UTC) #52
caitp
https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async-iterator.cc#newcode175 src/builtins/builtins-async-iterator.cc:175: Node* const error = On 2017/02/16 14:55:56, caitp wrote: ...
3 years, 10 months ago (2017-02-16 15:12:32 UTC) #55
jgruber
On 2017/02/15 19:48:49, caitp wrote: > So, for-await-of landed, this CL is next in line ...
3 years, 10 months ago (2017-02-16 17:22:00 UTC) #62
neis
I'll also send out a review today or Monday.
3 years, 10 months ago (2017-02-17 10:34:26 UTC) #63
jgruber
👌👌 lgtm once comments addressed. Didn't look at the tests in detail. https://codereview.chromium.org/2645313003/diff/320001/src/bootstrapper.cc File src/bootstrapper.cc ...
3 years, 10 months ago (2017-02-17 12:28:24 UTC) #64
caitp
https://codereview.chromium.org/2645313003/diff/320001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/2645313003/diff/320001/src/bootstrapper.cc#newcode792 src/bootstrapper.cc:792: void Genesis::CreateAsyncIteratorMaps(Handle<JSFunction> empty) { On 2017/02/17 12:28:22, jgruber wrote: ...
3 years, 10 months ago (2017-02-17 14:56:11 UTC) #67
jgruber
https://codereview.chromium.org/2645313003/diff/320001/src/compiler/code-assembler.cc File src/compiler/code-assembler.cc (right): https://codereview.chromium.org/2645313003/diff/320001/src/compiler/code-assembler.cc#newcode190 src/compiler/code-assembler.cc:190: Node* CodeAssembler::CStringConstant(const char* str) { On 2017/02/17 14:56:10, caitp ...
3 years, 10 months ago (2017-02-17 16:13:39 UTC) #70
neis
Great tests. A few minor comments below. Looking at the other files now. https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async.h File ...
3 years, 10 months ago (2017-02-20 09:41:21 UTC) #71
neis
https://codereview.chromium.org/2645313003/diff/340001/src/builtins/builtins-async-iterator.cc File src/builtins/builtins-async-iterator.cc (right): https://codereview.chromium.org/2645313003/diff/340001/src/builtins/builtins-async-iterator.cc#newcode82 src/builtins/builtins-async-iterator.cc:82: GotoIf(TaggedIsSmi(iter_result), &if_slowpath); I think LoadIteratorResult should either assume that ...
3 years, 10 months ago (2017-02-20 11:27:59 UTC) #72
caitp
I think I've covered all of these --- rebased version up shortly https://codereview.chromium.org/2645313003/diff/240001/src/builtins/builtins-async.h File src/builtins/builtins-async.h ...
3 years, 10 months ago (2017-02-20 17:09:35 UTC) #73
neis
https://codereview.chromium.org/2645313003/diff/340001/src/interpreter/interpreter-intrinsics.cc File src/interpreter/interpreter-intrinsics.cc (right): https://codereview.chromium.org/2645313003/diff/340001/src/interpreter/interpreter-intrinsics.cc#newcode312 src/interpreter/interpreter-intrinsics.cc:312: __ GotoIf(__ TaggedIsSmi(sync_iterator), &not_receiver); On 2017/02/20 17:09:35, caitp wrote: ...
3 years, 10 months ago (2017-02-20 18:26:54 UTC) #78
caitp
https://codereview.chromium.org/2645313003/diff/340001/src/interpreter/interpreter-intrinsics.cc File src/interpreter/interpreter-intrinsics.cc (right): https://codereview.chromium.org/2645313003/diff/340001/src/interpreter/interpreter-intrinsics.cc#newcode312 src/interpreter/interpreter-intrinsics.cc:312: __ GotoIf(__ TaggedIsSmi(sync_iterator), &not_receiver); On 2017/02/20 18:26:54, neis wrote: ...
3 years, 10 months ago (2017-02-20 20:09:20 UTC) #79
neis
lgtm modulo the assertUnreachable and the second Generate_AsyncFromSyncIteratorMethod (see below). Thanks! https://codereview.chromium.org/2645313003/diff/240001/test/mjsunit/harmony/async-from-sync-iterator.js File test/mjsunit/harmony/async-from-sync-iterator.js (right): ...
3 years, 10 months ago (2017-02-21 12:48:09 UTC) #80
caitp
https://codereview.chromium.org/2645313003/diff/240001/test/mjsunit/harmony/async-from-sync-iterator.js File test/mjsunit/harmony/async-from-sync-iterator.js (right): https://codereview.chromium.org/2645313003/diff/240001/test/mjsunit/harmony/async-from-sync-iterator.js#newcode22 test/mjsunit/harmony/async-from-sync-iterator.js:22: assertUnreachable("generator is closed"); On 2017/02/21 12:48:08, neis wrote: > ...
3 years, 10 months ago (2017-02-21 14:36:53 UTC) #81
caitp
Ahh, so, are people generally happy with the approach in this CL? Let me know ...
3 years, 10 months ago (2017-02-23 23:56:33 UTC) #82
caitp
On 2017/02/23 23:56:33, caitp wrote: > Ahh, so, are people generally happy with the approach ...
3 years, 10 months ago (2017-02-24 17:38:37 UTC) #87
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/2645313003/420001
3 years, 10 months ago (2017-02-24 17:39:01 UTC) #90
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/35461)
3 years, 10 months ago (2017-02-24 17:44:51 UTC) #92
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/2645313003/420001
3 years, 10 months ago (2017-02-24 17:47:12 UTC) #96
commit-bot: I haz the power
3 years, 10 months ago (2017-02-24 17:49:00 UTC) #99
Message was sent while issue was closed.
Committed patchset #22 (id:420001) as
https://chromium.googlesource.com/v8/v8/+/0423341034c767d91128c9fd68e3f51e603...

Powered by Google App Engine
This is Rietveld 408576698