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

Issue 1343363002: [Interpreter] Basic flow control. (Closed)

Created:
5 years, 3 months ago by oth
Modified:
5 years, 3 months ago
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

[Interpreter] Basic flow control. + Add bytecodes for conditional and unconditional jumps. + Add bytecodes for test/compare operations. + Expose jumps in bytecode-array-builder and add BytecodeLabel class for identifying jump targets. + Add support for if..then...else in the bytecode-generator. + Implement jump bytecodes in the interpreter. Test/compare operations dependent on runtime call for comparisons. BUG=v8:4280 LOG=N Committed: https://crrev.com/347fa90626a448e3535cf6aa100124dfd5b711ce Cr-Commit-Position: refs/heads/master@{#30918}

Patch Set 1 #

Patch Set 2 : Rebase. #

Patch Set 3 : Remove macros from test-interpreter.cc #

Patch Set 4 : Update test operations and conditional jumps to use booleans. #

Patch Set 5 : Update comments. #

Patch Set 6 : Unbreak test and remove an unnecessary edit. #

Patch Set 7 : Clarify comment and diff reduction. #

Total comments: 38

Patch Set 8 : Incorporate review comments from bmeurer on patch set 7. #

Patch Set 9 : Incorporate review comments from rmcilroy on patch set 7. #

Patch Set 10 : Simplify labels fixing label address re-use bug. #

Patch Set 11 : Remove dead method declaration. #

Patch Set 12 : Fix missing int cast for size_t. #

Total comments: 12

Patch Set 13 : New logic for emitting final return, avoid emitting CastToBoolean, additional tests. #

Patch Set 14 : Incorporate feedback from mstarzinger (https://codereview.chromium.org/1343363002/#msg6). #

Patch Set 15 : Rebase to fix patch failure with git cl try. #

Total comments: 45

Patch Set 16 : Incorporate rmcilroy's comments in https://codereview.chromium.org/1343363002/#msg9 #

Patch Set 17 : Fix compilation (sign vs unsigned). #

Total comments: 2

Patch Set 18 : Second attempt at fixing signed/unsigned build issue :-) #

Patch Set 19 : Another attempt at fixing compilation. #

Patch Set 20 : Incorporate comments in https://codereview.chromium.org/1343363002/#msg10 #

Total comments: 3

Patch Set 21 : Rebase. #

Patch Set 22 : Switch test-bytecode-generator/IfConditions to use new style bytecode array check. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1599 lines, -368 lines) Patch
M src/compiler/bytecode-graph-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +102 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +16 lines, -3 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +39 lines, -10 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -2 lines 0 comments Download
M src/compiler/raw-machine-assembler.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/interpreter/bytecode-array-builder.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +85 lines, -10 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 13 chunks +270 lines, -58 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.h 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/interpreter/bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +30 lines, -10 lines 0 comments Download
M src/interpreter/bytecodes.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +21 lines, -0 lines 0 comments Download
M src/interpreter/bytecodes.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/interpreter.h View 1 2 3 4 5 6 7 8 2 chunks +6 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +181 lines, -0 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 12 chunks +465 lines, -273 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +83 lines, -0 lines 0 comments Download
M test/unittests/compiler/interpreter-assembler-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +83 lines, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +210 lines, -1 line 0 comments Download

Messages

Total messages: 17 (4 generated)
oth
PTAL, this is the start of flow control. Thanks!
5 years, 3 months ago (2015-09-17 14:18:33 UTC) #2
Benedikt Meurer
LGTM on the basic approach from me. Two nits. https://codereview.chromium.org/1343363002/diff/120001/src/compiler/interpreter-assembler.cc File src/compiler/interpreter-assembler.cc (right): https://codereview.chromium.org/1343363002/diff/120001/src/compiler/interpreter-assembler.cc#newcode366 src/compiler/interpreter-assembler.cc:366: ...
5 years, 3 months ago (2015-09-17 17:04:18 UTC) #4
rmcilroy
Look good overall. My one main issue is with the way Output is generalized to ...
5 years, 3 months ago (2015-09-18 10:42:24 UTC) #5
Michael Starzinger
Looking good, mainly nits and random ramblings. https://codereview.chromium.org/1343363002/diff/220001/src/compiler/interpreter-assembler.cc File src/compiler/interpreter-assembler.cc (right): https://codereview.chromium.org/1343363002/diff/220001/src/compiler/interpreter-assembler.cc#newcode371 src/compiler/interpreter-assembler.cc:371: DispatchTo(Advance(delta)); Just ...
5 years, 3 months ago (2015-09-23 08:46:24 UTC) #6
Michael Starzinger
LGTM.
5 years, 3 months ago (2015-09-23 09:24:27 UTC) #7
oth
Thanks all! Definitely looking better. Will revise JumpIfWordEqual per mstarzinger's suggestion and update test before ...
5 years, 3 months ago (2015-09-23 10:46:56 UTC) #8
rmcilroy
Looks great. A bunch of comments but most are just nits. https://codereview.chromium.org/1343363002/diff/280001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): ...
5 years, 3 months ago (2015-09-23 14:00:29 UTC) #9
Michael Starzinger
https://codereview.chromium.org/1343363002/diff/320001/src/compiler/raw-machine-assembler.h File src/compiler/raw-machine-assembler.h (right): https://codereview.chromium.org/1343363002/diff/320001/src/compiler/raw-machine-assembler.h#newcode108 src/compiler/raw-machine-assembler.h:108: return HeapConstant(handle(HeapObject::cast(*object), isolate())); nit: Better use Handle<HeapObject>::cast(object) to avoid ...
5 years, 3 months ago (2015-09-24 10:37:22 UTC) #10
oth
Thanks all. Still missing refinement the test for JumpIf, but getting closer. https://codereview.chromium.org/1343363002/diff/280001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc ...
5 years, 3 months ago (2015-09-24 11:15:28 UTC) #11
rmcilroy
LGTM! Thanks! https://codereview.chromium.org/1343363002/diff/280001/src/interpreter/bytecode-array-builder.cc File src/interpreter/bytecode-array-builder.cc (right): https://codereview.chromium.org/1343363002/diff/280001/src/interpreter/bytecode-array-builder.cc#newcode88 src/interpreter/bytecode-array-builder.cc:88: Output(bytes); On 2015/09/24 11:15:27, oth wrote: > ...
5 years, 3 months ago (2015-09-24 11:44:36 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1343363002/420001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1343363002/420001
5 years, 3 months ago (2015-09-24 14:51:03 UTC) #15
commit-bot: I haz the power
Committed patchset #22 (id:420001)
5 years, 3 months ago (2015-09-24 15:20:53 UTC) #16
commit-bot: I haz the power
5 years, 3 months ago (2015-09-24 15:21:18 UTC) #17
Message was sent while issue was closed.
Patchset 22 (id:??) landed as
https://crrev.com/347fa90626a448e3535cf6aa100124dfd5b711ce
Cr-Commit-Position: refs/heads/master@{#30918}

Powered by Google App Engine
This is Rietveld 408576698