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

Issue 1362383002: [Interpreter] Add CallRuntime support to the interpreter. (Closed)

Created:
5 years, 3 months ago by rmcilroy
Modified:
5 years, 2 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] Add CallRuntime support to the interpreter. Adds support for calling runtime functions from the interpreter. Adds the CallRuntime bytecode which takes a Runtime::FunctionId of the function to call and the arguments in sequential registers. Adds a InterpreterCEntry builtin to enable the interpreter to enter C++ code based on the functionId. Also renames Builtin::PushArgsAndCall to Builtin::InterpreterPushArgsAndCall and groups all the interpreter builtins together. BUG=v8:4280 LOG=N Committed: https://crrev.com/75f6ad74b2c0fe2e5dec7110d076d892cfbb6b69 Cr-Commit-Position: refs/heads/master@{#31089}

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Move function address calculation into bytecode handler and have an option on CEntry stub for argv_… #

Total comments: 23

Patch Set 3 : Rebase #

Patch Set 4 : Address review comments. #

Total comments: 2

Patch Set 5 : Fix typo #

Patch Set 6 : Rebased #

Patch Set 7 : Ensure stack is correct after centry in interpreter #

Patch Set 8 : Fix gcc compiler errors #

Patch Set 9 : Fix arm32 debug build check errors. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+824 lines, -328 lines) Patch
M src/arm/builtins-arm.cc View 1 2 chunks +29 lines, -29 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 7 8 2 chunks +20 lines, -6 lines 0 comments Download
M src/arm/interface-descriptors-arm.cc View 1 2 3 1 chunk +13 lines, -2 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 2 3 4 5 6 3 chunks +11 lines, -9 lines 0 comments Download
M src/arm64/interface-descriptors-arm64.cc View 1 2 3 1 chunk +14 lines, -2 lines 0 comments Download
M src/assembler.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -0 lines 0 comments Download
M src/assembler.cc View 1 2 3 4 5 6 7 8 1 chunk +7 lines, -0 lines 0 comments Download
M src/bailout-reason.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 5 chunks +8 lines, -8 lines 0 comments Download
M src/code-factory.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M src/code-factory.cc View 1 2 3 4 5 6 7 8 1 chunk +13 lines, -3 lines 0 comments Download
M src/code-stubs.h View 1 2 3 chunks +7 lines, -3 lines 0 comments Download
M src/compiler/bytecode-graph-builder.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.h View 1 2 3 4 5 6 3 chunks +5 lines, -0 lines 0 comments Download
M src/compiler/interpreter-assembler.cc View 1 2 3 4 5 6 7 5 chunks +62 lines, -5 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 chunks +35 lines, -35 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 2 chunks +14 lines, -2 lines 0 comments Download
M src/ia32/interface-descriptors-ia32.cc View 1 1 chunk +13 lines, -2 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 2 chunks +13 lines, -8 lines 0 comments Download
M src/interface-descriptors.h View 1 2 3 chunks +13 lines, -4 lines 0 comments Download
M src/interpreter/bytecode-array-builder.h View 1 2 3 4 3 chunks +12 lines, -2 lines 0 comments Download
M src/interpreter/bytecode-array-builder.cc View 1 2 3 4 5 6 7 8 12 chunks +27 lines, -11 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/interpreter/bytecode-array-iterator.cc View 1 2 1 chunk +6 lines, -0 lines 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 2 3 1 chunk +24 lines, -1 line 0 comments Download
M src/interpreter/bytecodes.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/interpreter/interpreter.cc View 1 2 2 chunks +18 lines, -3 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 2 chunks +29 lines, -29 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 6 7 8 2 chunks +21 lines, -6 lines 0 comments Download
M src/mips/interface-descriptors-mips.cc View 1 2 3 1 chunk +13 lines, -2 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 2 chunks +29 lines, -29 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 6 7 8 2 chunks +21 lines, -6 lines 0 comments Download
M src/mips64/interface-descriptors-mips64.cc View 1 2 3 1 chunk +13 lines, -2 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 3 chunks +35 lines, -21 lines 0 comments Download
M src/runtime/runtime.cc View 1 2 3 2 chunks +26 lines, -0 lines 0 comments Download
M src/snapshot/serialize.cc View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 chunks +35 lines, -35 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 3 chunks +12 lines, -2 lines 0 comments Download
M src/x64/interface-descriptors-x64.cc View 1 1 chunk +13 lines, -2 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -2 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 7 8 2 chunks +14 lines, -8 lines 0 comments Download
M test/cctest/interpreter/test-bytecode-generator.cc View 1 2 4 chunks +115 lines, -40 lines 0 comments Download
M test/cctest/interpreter/test-interpreter.cc View 1 2 1 chunk +22 lines, -0 lines 0 comments Download
M test/unittests/compiler/interpreter-assembler-unittest.cc View 1 2 3 chunks +29 lines, -2 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-builder-unittest.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M test/unittests/interpreter/bytecode-array-iterator-unittest.cc View 1 2 3 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 73 (31 generated)
rmcilroy
Benedikt, Orion, could you please take a look? Please let me know if you're happy ...
5 years, 3 months ago (2015-09-24 16:28:22 UTC) #3
Yang
On 2015/09/24 16:28:22, rmcilroy wrote: > Benedikt, Orion, could you please take a look? Please ...
5 years, 3 months ago (2015-09-24 16:57:20 UTC) #4
Benedikt Meurer
Builtin part LGTM. Overall approach also looks reasonable, tho I guess you'll need specialized byte ...
5 years, 3 months ago (2015-09-24 17:55:49 UTC) #7
Benedikt Meurer
+mstarzinger for graph builder and general review.
5 years, 3 months ago (2015-09-24 17:56:27 UTC) #8
oth
LGTM. https://codereview.chromium.org/1362383002/diff/20001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc (right): https://codereview.chromium.org/1362383002/diff/20001/src/interpreter/interpreter.cc#newcode367 src/interpreter/interpreter.cc:367: Node* function_id = __ BytecodeOperandIdx(0); A TODO for ...
5 years, 3 months ago (2015-09-25 09:49:27 UTC) #9
Michael Starzinger
https://codereview.chromium.org/1362383002/diff/20001/src/x64/builtins-x64.cc File src/x64/builtins-x64.cc (right): https://codereview.chromium.org/1362383002/diff/20001/src/x64/builtins-x64.cc#newcode823 src/x64/builtins-x64.cc:823: const int kFunctionSizeLog2 = 2 + kPointerSizeLog2; Hmm, I ...
5 years, 2 months ago (2015-09-25 11:23:26 UTC) #10
rmcilroy
Reworked the code to avoid the need for a new builtin, PTAL. https://codereview.chromium.org/1362383002/diff/20001/src/interpreter/interpreter.cc File src/interpreter/interpreter.cc ...
5 years, 2 months ago (2015-09-28 16:20:48 UTC) #12
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/60001
5 years, 2 months ago (2015-09-28 16:44:25 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/6751)
5 years, 2 months ago (2015-09-28 16:58:17 UTC) #16
Michael Starzinger
LGTM, just nits and minor comments left. I like this approach much more as opposed ...
5 years, 2 months ago (2015-09-29 08:28:34 UTC) #17
oth
Looks good on the interpreter front. https://codereview.chromium.org/1362383002/diff/60001/src/interpreter/bytecode-generator.cc File src/interpreter/bytecode-generator.cc (right): https://codereview.chromium.org/1362383002/diff/60001/src/interpreter/bytecode-generator.cc#newcode483 src/interpreter/bytecode-generator.cc:483: DCHECK(expr->function()->result_size <= 1); ...
5 years, 2 months ago (2015-09-29 09:33:36 UTC) #18
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/80001
5 years, 2 months ago (2015-10-01 15:02:19 UTC) #20
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/6868)
5 years, 2 months ago (2015-10-01 15:07:45 UTC) #22
rmcilroy
Comments addressed, PTAL, thanks. https://codereview.chromium.org/1362383002/diff/60001/src/builtins.h File src/builtins.h (right): https://codereview.chromium.org/1362383002/diff/60001/src/builtins.h#newcode306 src/builtins.h:306: static void Generate_InterpreterCEntry(MacroAssembler* masm); On ...
5 years, 2 months ago (2015-10-01 17:02:45 UTC) #24
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/120001
5 years, 2 months ago (2015-10-01 17:03:28 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/140001
5 years, 2 months ago (2015-10-01 17:05:52 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_gcc_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_gcc_compile_rel/builds/6879)
5 years, 2 months ago (2015-10-01 17:15:59 UTC) #32
Michael Starzinger
https://codereview.chromium.org/1362383002/diff/60001/src/runtime/runtime.cc File src/runtime/runtime.cc (right): https://codereview.chromium.org/1362383002/diff/60001/src/runtime/runtime.cc#newcode105 src/runtime/runtime.cc:105: if (!kRedirectedIntrinsicFunctions) { On 2015/10/01 17:02:45, rmcilroy wrote: > ...
5 years, 2 months ago (2015-10-01 17:43:48 UTC) #33
Michael Starzinger
https://codereview.chromium.org/1362383002/diff/140001/src/runtime/runtime.h File src/runtime/runtime.h (left): https://codereview.chromium.org/1362383002/diff/140001/src/runtime/runtime.h#oldcode1113 src/runtime/runtime.h:1113: class RuntimeState { Thanks for moving this down, this ...
5 years, 2 months ago (2015-10-01 17:45:17 UTC) #34
rmcilroy
https://codereview.chromium.org/1362383002/diff/140001/src/runtime/runtime.h File src/runtime/runtime.h (left): https://codereview.chromium.org/1362383002/diff/140001/src/runtime/runtime.h#oldcode1113 src/runtime/runtime.h:1113: class RuntimeState { On 2015/10/01 17:45:17, Michael Starzinger wrote: ...
5 years, 2 months ago (2015-10-01 20:44:25 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/160001
5 years, 2 months ago (2015-10-01 20:44:43 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: v8_win64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel/builds/9222) v8_win_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-01 20:46:58 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/180001
5 years, 2 months ago (2015-10-02 06:58:29 UTC) #43
commit-bot: I haz the power
Committed patchset #6 (id:180001)
5 years, 2 months ago (2015-10-02 07:25:44 UTC) #44
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/40e8424b744f8b6e3e1d93e20f23487419911dfc Cr-Commit-Position: refs/heads/master@{#31064}
5 years, 2 months ago (2015-10-02 07:26:04 UTC) #45
rmcilroy
A revert of this CL (patchset #6 id:180001) has been created in https://codereview.chromium.org/1387543002/ by rmcilroy@chromium.org. ...
5 years, 2 months ago (2015-10-02 09:20:39 UTC) #46
rmcilroy
Mich: I've uploaded a fix to the issue which caused the revert - it turns ...
5 years, 2 months ago (2015-10-02 11:39:49 UTC) #47
Michael Starzinger
LGTM in patch set 7.
5 years, 2 months ago (2015-10-02 12:43:31 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/200001
5 years, 2 months ago (2015-10-02 12:44:13 UTC) #51
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mips64el_compile_rel/builds/5216)
5 years, 2 months ago (2015-10-02 12:49:45 UTC) #53
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/220001
5 years, 2 months ago (2015-10-02 13:46:59 UTC) #56
commit-bot: I haz the power
Committed patchset #8 (id:220001)
5 years, 2 months ago (2015-10-02 14:12:03 UTC) #57
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/c991d8f3846e89b1cd745f0cabe4eaea54d75c0c Cr-Commit-Position: refs/heads/master@{#31076}
5 years, 2 months ago (2015-10-02 14:12:18 UTC) #58
rmcilroy
A revert of this CL (patchset #8 id:220001) has been created in https://codereview.chromium.org/1379933003/ by rmcilroy@chromium.org. ...
5 years, 2 months ago (2015-10-02 15:11:10 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/240001
5 years, 2 months ago (2015-10-02 17:30:20 UTC) #62
rmcilroy
Let's try this again... Minor tweak which fixes the arm32 check error on the debug ...
5 years, 2 months ago (2015-10-02 17:31:18 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_asan_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_asan_rel/builds/8580) v8_linux_mips64el_compile_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-02 17:32:34 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/240001
5 years, 2 months ago (2015-10-02 17:38:27 UTC) #67
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel/builds/10288) v8_linux_arm64_rel on tryserver.v8 (JOB_FAILED, ...
5 years, 2 months ago (2015-10-02 17:39:59 UTC) #69
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1362383002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1362383002/240001
5 years, 2 months ago (2015-10-02 17:51:21 UTC) #71
commit-bot: I haz the power
Committed patchset #9 (id:240001)
5 years, 2 months ago (2015-10-02 18:13:45 UTC) #72
commit-bot: I haz the power
5 years, 2 months ago (2015-10-02 18:14:14 UTC) #73
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/75f6ad74b2c0fe2e5dec7110d076d892cfbb6b69
Cr-Commit-Position: refs/heads/master@{#31089}

Powered by Google App Engine
This is Rietveld 408576698