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

Issue 2917263002: Move generator-close on exception from the generator function to the GeneratorResume builtin. (Closed)

Created:
3 years, 6 months ago by Jarin
Modified:
3 years, 6 months ago
Reviewers:
caitp, neis, adamk, rmcilroy
CC:
v8-reviews_googlegroups.com, marja+watch_chromium.org, rmcilroy, caitp (chromium)
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Move generator-close on exception from the generator function to the GeneratorResume builtin. The change also moves creation of the iterator result from the parser to the bytecode generator. Unfortunately, async generators will stay on the old scheme (try-finally around generator body) because I am not exactly sure how they work. Review-Url: https://codereview.chromium.org/2917263002 Cr-Commit-Position: refs/heads/master@{#45713} Committed: https://chromium.googlesource.com/v8/v8/+/7fa77063cf98cddf5ee721df7279b0f0c8ebf0d3

Patch Set 1 #

Patch Set 2 : Improve comments #

Patch Set 3 : Add the builtins to the uncaught exception prediction list #

Total comments: 3

Patch Set 4 : Move creation of IteratorResult for final return to the builtin." #

Patch Set 5 : Scope for the old unused context register #

Total comments: 4

Patch Set 6 : Address comments & rebase #

Total comments: 2

Patch Set 7 : Rebase #

Patch Set 8 : Add register allocation scope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1472 lines, -1838 lines) Patch
M src/ast/ast.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M src/builtins/builtins-definitions.h View 1 2 1 chunk +5 lines, -1 line 0 comments Download
M src/builtins/builtins-generator-gen.cc View 1 2 3 3 chunks +28 lines, -3 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 4 chunks +29 lines, -15 lines 0 comments Download
M src/parsing/parser.h View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M src/parsing/parser.cc View 1 2 3 4 5 6 4 chunks +38 lines, -50 lines 0 comments Download
M src/parsing/parser-base.h View 1 2 3 4 5 6 3 chunks +3 lines, -11 lines 0 comments Download
M src/parsing/preparser.h View 1 2 3 4 5 6 2 chunks +4 lines, -5 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForAwaitOf.golden View 1 2 3 4 5 6 18 chunks +451 lines, -487 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ForOfLoop.golden View 1 2 3 4 5 6 18 chunks +254 lines, -338 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Generators.golden View 1 2 3 4 5 6 18 chunks +225 lines, -387 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/Modules.golden View 1 2 3 4 5 6 26 chunks +295 lines, -328 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/StandardForLoop.golden View 1 2 3 4 5 6 13 chunks +133 lines, -211 lines 0 comments Download

Messages

Total messages: 37 (26 generated)
Jarin
Could you take a look, please?
3 years, 6 months ago (2017-06-03 19:32:10 UTC) #7
caitp
> Unfortunately, async generators will stay on the old scheme (try-finally around generator body) because ...
3 years, 6 months ago (2017-06-03 22:54:17 UTC) #12
caitp
https://codereview.chromium.org/2917263002/diff/40001/src/builtins/builtins-generator-gen.cc File src/builtins/builtins-generator-gen.cc (right): https://codereview.chromium.org/2917263002/diff/40001/src/builtins/builtins-generator-gen.cc#newcode57 src/builtins/builtins-generator-gen.cc:57: GotoIfException(result, &if_exception, &var_exception); also, given what I said in ...
3 years, 6 months ago (2017-06-03 23:14:00 UTC) #14
Jarin
I also moved creation of IteratorResult for final return to the GeneratorResume builtin. I would ...
3 years, 6 months ago (2017-06-04 08:49:39 UTC) #15
Jarin
https://codereview.chromium.org/2917263002/diff/40001/src/builtins/builtins-generator-gen.cc File src/builtins/builtins-generator-gen.cc (right): https://codereview.chromium.org/2917263002/diff/40001/src/builtins/builtins-generator-gen.cc#newcode57 src/builtins/builtins-generator-gen.cc:57: GotoIfException(result, &if_exception, &var_exception); On 2017/06/03 23:14:00, caitp wrote: > ...
3 years, 6 months ago (2017-06-04 08:56:47 UTC) #16
rmcilroy
Nice, LGTM. https://codereview.chromium.org/2917263002/diff/80001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/2917263002/diff/80001/src/interpreter/bytecode-generator.cc#newcode2190 src/interpreter/bytecode-generator.cc:2190: Register result = register_allocator()->NewRegister(); nit - add ...
3 years, 6 months ago (2017-06-05 10:02:58 UTC) #21
Jarin
https://codereview.chromium.org/2917263002/diff/80001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/2917263002/diff/80001/src/interpreter/bytecode-generator.cc#newcode2190 src/interpreter/bytecode-generator.cc:2190: Register result = register_allocator()->NewRegister(); On 2017/06/05 10:02:58, rmcilroy wrote: ...
3 years, 6 months ago (2017-06-05 16:03:25 UTC) #25
adamk
lgtm % register scope (unless I'm missing something) https://codereview.chromium.org/2917263002/diff/120001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/2917263002/diff/120001/src/interpreter/bytecode-generator.cc#newcode2191 src/interpreter/bytecode-generator.cc:2191: Register ...
3 years, 6 months ago (2017-06-05 18:37:37 UTC) #28
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/2917263002/160001
3 years, 6 months ago (2017-06-05 19:24:45 UTC) #33
rmcilroy
https://codereview.chromium.org/2917263002/diff/120001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/2917263002/diff/120001/src/interpreter/bytecode-generator.cc#newcode2191 src/interpreter/bytecode-generator.cc:2191: Register result = register_allocator()->NewRegister(); On 2017/06/05 18:37:36, adamk wrote: ...
3 years, 6 months ago (2017-06-05 19:28:42 UTC) #34
commit-bot: I haz the power
3 years, 6 months ago (2017-06-05 19:54:24 UTC) #37
Message was sent while issue was closed.
Committed patchset #8 (id:160001) as
https://chromium.googlesource.com/v8/v8/+/7fa77063cf98cddf5ee721df7279b0f0c8e...

Powered by Google App Engine
This is Rietveld 408576698