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

Issue 1239793002: [interpreter] Add basic framework for bytecode handler code generation. (Closed)

Created:
5 years, 5 months ago by rmcilroy
Modified:
5 years, 5 months ago
CC:
v8-dev, picksi1
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[interpreter] Add basic framework for bytecode handler code generation. Adds basic support for generation of interpreter bytecode handler code snippets. The InterpreterAssembler class exposes a set of low level, interpreter specific operations which can be used to build a Turbofan graph. The Interpreter class generates a bytecode handler snippet for each bytecode by assembling operations using an InterpreterAssembler. Currently only two simple bytecodes are supported: LoadLiteral0 and Return. BUG=v8:4280 LOG=N Committed: https://crrev.com/7877c4e0c77b5c2b97678406eab7e9ad6eba4a4d Cr-Commit-Position: refs/heads/master@{#29814}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Review comments. #

Total comments: 2

Patch Set 3 : Add comment to count macro. #

Total comments: 17

Patch Set 4 : Review comments #

Total comments: 10

Patch Set 5 : Review comments and linkage changes for other architectures #

Patch Set 6 : Add tests #

Total comments: 6

Patch Set 7 : Rebase #

Patch Set 8 : Final comments. #

Patch Set 9 : Add Build.gn changes. #

Patch Set 10 : Fix compile error #

Patch Set 11 : Fix GN for realz #

Unified diffs Side-by-side diffs Delta from patch set Stats (+927 lines, -38 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 2 chunks +6 lines, -0 lines 0 comments Download
M src/DEPS View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/arm/linkage-arm.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/arm64/linkage-arm64.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/ia32/linkage-ia32.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
A src/compiler/interpreter-assembler.h View 1 2 3 4 5 6 7 1 chunk +107 lines, -0 lines 0 comments Download
A src/compiler/interpreter-assembler.cc View 1 2 3 4 5 6 7 1 chunk +207 lines, -0 lines 0 comments Download
M src/compiler/linkage.h View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M src/compiler/linkage-impl.h View 1 2 3 4 5 6 1 chunk +14 lines, -7 lines 0 comments Download
M src/compiler/mips/linkage-mips.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/mips64/linkage-mips64.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/compiler/raw-machine-assembler.h View 1 2 3 4 5 6 6 chunks +9 lines, -9 lines 0 comments Download
M src/compiler/raw-machine-assembler.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M src/compiler/x64/linkage-x64.cc View 1 2 3 4 2 chunks +4 lines, -3 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 4 5 6 2 chunks +7 lines, -1 line 0 comments Download
M src/heap/heap.h View 1 2 3 4 5 6 2 chunks +6 lines, -1 line 0 comments Download
M src/heap/heap.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
A src/interpreter/DEPS View 1 chunk +4 lines, -0 lines 0 comments Download
A + src/interpreter/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A src/interpreter/bytecodes.h View 1 2 3 4 1 chunk +56 lines, -0 lines 0 comments Download
A src/interpreter/bytecodes.cc View 1 2 3 1 chunk +51 lines, -0 lines 0 comments Download
A src/interpreter/interpreter.h View 1 2 3 4 1 chunk +49 lines, -0 lines 0 comments Download
A src/interpreter/interpreter.cc View 1 2 3 4 5 1 chunk +64 lines, -0 lines 0 comments Download
M src/isolate.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M src/isolate.cc View 1 2 3 4 5 6 4 chunks +9 lines, -0 lines 0 comments Download
A test/unittests/compiler/interpreter-assembler-unittest.h View 1 2 3 4 5 6 7 1 chunk +56 lines, -0 lines 0 comments Download
A test/unittests/compiler/interpreter-assembler-unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +176 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.h View 1 2 3 4 5 6 7 3 chunks +9 lines, -0 lines 0 comments Download
M test/unittests/compiler/node-test-utils.cc View 1 2 3 4 5 6 7 5 chunks +47 lines, -0 lines 0 comments Download
M test/unittests/unittests.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (21 generated)
oth
LGTM. Trivial comments, but overall this looks great. https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage-impl.h File src/compiler/linkage-impl.h (right): https://codereview.chromium.org/1239793002/diff/1/src/compiler/linkage-impl.h#newcode243 src/compiler/linkage-impl.h:243: DCHECK_EQ(0, ...
5 years, 5 months ago (2015-07-15 13:22:01 UTC) #2
rmcilroy
Thanks Orion. Benedikt / Michael: Could you take a look please. Let me know if ...
5 years, 5 months ago (2015-07-15 16:55:58 UTC) #4
rmcilroy
p.s., I've updated the design in the Ignition design doc [1] to reflect the change ...
5 years, 5 months ago (2015-07-15 16:59:36 UTC) #5
picksi
https://codereview.chromium.org/1239793002/diff/20001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/1239793002/diff/20001/src/interpreter/interpreter.cc#newcode29 src/interpreter/interpreter.cc:29: static_cast<int>(Bytecode::kLast) + 1, TENURED); It's probably macro magic, but ...
5 years, 5 months ago (2015-07-16 09:08:10 UTC) #7
rmcilroy
https://codereview.chromium.org/1239793002/diff/20001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/1239793002/diff/20001/src/interpreter/interpreter.cc#newcode29 src/interpreter/interpreter.cc:29: static_cast<int>(Bytecode::kLast) + 1, TENURED); On 2015/07/16 09:08:10, picksi wrote: ...
5 years, 5 months ago (2015-07-16 15:11:10 UTC) #8
picksi
That is very clever (and a little horrid!). Can we add a comment to explain ...
5 years, 5 months ago (2015-07-16 17:06:27 UTC) #9
rmcilroy
Michael / Benedikt: friendly ping? On 2015/07/16 17:06:27, picksi wrote: > That is very clever ...
5 years, 5 months ago (2015-07-17 09:26:02 UTC) #10
picksi
Thanks! That is much clearer now.
5 years, 5 months ago (2015-07-17 09:32:26 UTC) #11
Michael Starzinger
https://codereview.chromium.org/1239793002/diff/40001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1239793002/diff/40001/src/compiler/interpreter-assembler.h#newcode8 src/compiler/interpreter-assembler.h:8: #include "src/interpreter/bytecodes.h" Can we add the same comment that ...
5 years, 5 months ago (2015-07-17 13:20:59 UTC) #12
rmcilroy
Comments addressed, PTAL. https://codereview.chromium.org/1239793002/diff/40001/src/compiler/interpreter-assembler.h File src/compiler/interpreter-assembler.h (right): https://codereview.chromium.org/1239793002/diff/40001/src/compiler/interpreter-assembler.h#newcode8 src/compiler/interpreter-assembler.h:8: #include "src/interpreter/bytecodes.h" On 2015/07/17 13:20:58, Michael ...
5 years, 5 months ago (2015-07-21 11:13:21 UTC) #16
Michael Starzinger
LGTM from my end. Please also wait on sign-off from Benedikt on this one. https://codereview.chromium.org/1239793002/diff/40001/src/compiler/linkage-impl.h ...
5 years, 5 months ago (2015-07-21 13:51:45 UTC) #17
rmcilroy
Added some unittests, if you could take a last quick look at the tests, thanks. ...
5 years, 5 months ago (2015-07-23 10:43:54 UTC) #19
Michael Starzinger
LGTM on the unit tests as well. https://codereview.chromium.org/1239793002/diff/180001/test/unittests/compiler/interpreter-assembler-unittest.h File test/unittests/compiler/interpreter-assembler-unittest.h (right): https://codereview.chromium.org/1239793002/diff/180001/test/unittests/compiler/interpreter-assembler-unittest.h#newcode42 test/unittests/compiler/interpreter-assembler-unittest.h:42: CallDescriptor* call_descriptor() ...
5 years, 5 months ago (2015-07-23 11:05:04 UTC) #20
rmcilroy
Thanks for the reviews! Benedikt, I'll land this now, but happy to make any changes ...
5 years, 5 months ago (2015-07-23 11:58:54 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239793002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1239793002/260001
5 years, 5 months ago (2015-07-23 11:59:06 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: v8_mac_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_mac_rel/builds/8008)
5 years, 5 months ago (2015-07-23 12:05:09 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239793002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1239793002/300001
5 years, 5 months ago (2015-07-23 12:38:25 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239793002/310001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1239793002/310001
5 years, 5 months ago (2015-07-23 12:39:48 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_chromium_gn_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_chromium_gn_rel/builds/6359)
5 years, 5 months ago (2015-07-23 13:02:45 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1239793002/330001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1239793002/330001
5 years, 5 months ago (2015-07-23 13:53:07 UTC) #41
commit-bot: I haz the power
Committed patchset #11 (id:330001)
5 years, 5 months ago (2015-07-23 14:21:31 UTC) #42
commit-bot: I haz the power
5 years, 5 months ago (2015-07-23 14:21:49 UTC) #43
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/7877c4e0c77b5c2b97678406eab7e9ad6eba4a4d
Cr-Commit-Position: refs/heads/master@{#29814}

Powered by Google App Engine
This is Rietveld 408576698