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

Issue 1311013008: [builtins] Unify the various versions of [[Call]] with a Call builtin. (Closed)

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

Description

[builtins] Unify the various versions of [[Call]] with a Call builtin. The new Call and CallFunction builtins supersede the current CallFunctionStub (and CallIC magic) and will be the single bottleneck for all calling, including the currently special Function.prototype.call and Function.prototype.apply builtins, which had handwritten (and not fully compliant) versions of CallFunctionStub, and also the CallIC(s), which where also slightly different. This also reduces the overhead for API function calls, which is still unnecessary high, but let's do that step-by-step. This also fixes a bunch of cases where the implicit ToObject for sloppy receivers was done in the wrong context (in the caller context instead of the callee context), which basically meant that we allowed cross context access to %ObjectPrototype%. MIPS and MIPS64 ports contributed by akos.palfi@imgtec.com. R=mstarzinger@chromium.org, jarin@chromium.org, mvstanton@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux_layout_dbg,v8_linux_nosnap_dbg BUG=v8:4413 LOG=n Committed: https://crrev.com/ef268a83be4dead004047c25b702319ea4be7277 Cr-Commit-Position: refs/heads/master@{#30627} Committed: https://crrev.com/ccbb4ff00f1d8f32fd9227cd7aba1723791e5744 Cr-Commit-Position: refs/heads/master@{#30629}

Patch Set 1 #

Patch Set 2 : Cleanup and refactoring the CallCallableStub. #

Patch Set 3 : Turn the stub into builtin(s). Some cleanup and TODOs. #

Patch Set 4 : Fix FrameScope for API functions. #

Total comments: 2

Patch Set 5 : ia32 port. #

Total comments: 2

Patch Set 6 : arm port. #

Patch Set 7 : arm64 port. #

Patch Set 8 : REBASE #

Patch Set 9 : Renaming to Call/CallFunction. Add comments. #

Patch Set 10 : Merge MIPS/MIPS64 ports from akos.palfi@imgtec.com. #

Patch Set 11 : AssertFunction was wrong #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1336 lines, -1614 lines) Patch
M src/arm/builtins-arm.cc View 1 2 3 4 5 6 7 8 9 5 chunks +156 lines, -233 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 7 8 7 chunks +11 lines, -38 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 1 2 3 4 5 3 chunks +22 lines, -0 lines 0 comments Download
M src/arm/macro-assembler-arm.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -0 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 2 3 4 5 6 7 8 5 chunks +151 lines, -221 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 2 3 4 5 6 7 8 7 chunks +11 lines, -39 lines 0 comments Download
M src/arm64/macro-assembler-arm64.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M src/arm64/macro-assembler-arm64.cc View 1 2 3 4 5 6 2 chunks +19 lines, -0 lines 0 comments Download
M src/bailout-reason.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 4 5 6 7 8 2 chunks +9 lines, -0 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M src/contexts.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M src/ia32/assembler-ia32.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 3 4 5 6 7 8 4 chunks +176 lines, -216 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 7 8 7 chunks +11 lines, -41 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 chunks +38 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +24 lines, -0 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 2 3 4 5 6 7 8 9 5 chunks +160 lines, -227 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 6 7 8 9 7 chunks +11 lines, -37 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 2 3 4 5 6 7 8 9 3 chunks +24 lines, -0 lines 0 comments Download
M src/mips/macro-assembler-mips.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +20 lines, -0 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 2 3 4 5 6 7 8 9 5 chunks +158 lines, -227 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 6 7 8 9 7 chunks +12 lines, -38 lines 0 comments Download
M src/mips64/macro-assembler-mips64.h View 1 2 3 4 5 6 7 8 9 3 chunks +24 lines, -0 lines 0 comments Download
M src/mips64/macro-assembler-mips64.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +19 lines, -0 lines 0 comments Download
M src/objects.h View 1 chunk +1 line, -1 line 0 comments Download
M src/runtime.js View 5 chunks +16 lines, -29 lines 0 comments Download
M src/runtime/runtime-function.cc View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 3 4 5 6 7 8 4 chunks +165 lines, -207 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 7 8 7 chunks +23 lines, -54 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 chunks +21 lines, -0 lines 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 55 (23 generated)
Benedikt Meurer
Hey Ross, This is the very first version of the CallCallableStub. You said you wanted ...
5 years, 3 months ago (2015-09-04 17:47:08 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/20001
5 years, 3 months ago (2015-09-04 18:56:50 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_rel/builds/9367)
5 years, 3 months ago (2015-09-04 18:59:35 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/40001
5 years, 3 months ago (2015-09-04 20:12:24 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_nodcheck_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_nodcheck_rel/builds/6325)
5 years, 3 months ago (2015-09-04 20:14:16 UTC) #10
Benedikt Meurer
Hey Jaro, Can you take a look at the x64 port before I start porting ...
5 years, 3 months ago (2015-09-07 06:47:08 UTC) #15
Benedikt Meurer
Hey MIPS guys, Please port this CL to mips/mips64. Thanks, Benedikt
5 years, 3 months ago (2015-09-07 07:13:29 UTC) #16
Jarin
looks good so far. https://codereview.chromium.org/1311013008/diff/80001/src/x64/builtins-x64.cc File src/x64/builtins-x64.cc (right): https://codereview.chromium.org/1311013008/diff/80001/src/x64/builtins-x64.cc#newcode1732 src/x64/builtins-x64.cc:1732: // TODO(bmeurer): This doesn't match ...
5 years, 3 months ago (2015-09-07 07:49:43 UTC) #17
Benedikt Meurer
Hey Michi, Michael, Please review the x64 or ia32 port (i'm about to port to ...
5 years, 3 months ago (2015-09-07 08:05:24 UTC) #19
mvstanton
Code-stubs-* is looking good. https://codereview.chromium.org/1311013008/diff/120001/src/code-stubs.h File src/code-stubs.h (right): https://codereview.chromium.org/1311013008/diff/120001/src/code-stubs.h#newcode1957 src/code-stubs.h:1957: // and less horrible Invoke ...
5 years, 3 months ago (2015-09-07 09:06:50 UTC) #20
Benedikt Meurer
https://codereview.chromium.org/1311013008/diff/80001/src/x64/builtins-x64.cc File src/x64/builtins-x64.cc (right): https://codereview.chromium.org/1311013008/diff/80001/src/x64/builtins-x64.cc#newcode1732 src/x64/builtins-x64.cc:1732: // TODO(bmeurer): This doesn't match the ES6 spec for ...
5 years, 3 months ago (2015-09-07 09:14:34 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/140001
5 years, 3 months ago (2015-09-07 09:18:02 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux_mipsel_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mipsel_compile_rel/builds/4443)
5 years, 3 months ago (2015-09-07 09:21:16 UTC) #25
rmcilroy
Overall looks good, should be something that can be used by the Interpreter. I tried ...
5 years, 3 months ago (2015-09-07 11:01:19 UTC) #27
Benedikt Meurer
On 2015/09/07 11:01:19, rmcilroy wrote: > Overall looks good, should be something that can be ...
5 years, 3 months ago (2015-09-07 11:04:30 UTC) #28
rmcilroy
> It's just a regular code object. You need to provide a Callable for it ...
5 years, 3 months ago (2015-09-07 11:26:42 UTC) #29
Michael Starzinger
LGTM.
5 years, 3 months ago (2015-09-07 11:53:21 UTC) #30
Jarin
lgtm
5 years, 3 months ago (2015-09-07 13:02:30 UTC) #31
mvstanton
LGTM here too.
5 years, 3 months ago (2015-09-07 13:25:39 UTC) #32
rmcilroy
Just tried this with the interpreter CallJS WIP CL and it works fine. LGTM, thanks!
5 years, 3 months ago (2015-09-07 13:42:33 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/200001
5 years, 3 months ago (2015-09-07 18:32:56 UTC) #35
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: v8_linux64_avx2_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_avx2_rel/builds/4142) v8_linux_nodcheck_rel on ...
5 years, 3 months ago (2015-09-07 18:35:07 UTC) #37
Benedikt Meurer
I renamed the builtins to Call and CallFunction to better match the spec names.
5 years, 3 months ago (2015-09-07 19:01:34 UTC) #39
paul.l...
Hey Benedikt - Please find MIPS ports from Ákos in https://codereview.chromium.org/1311003006/
5 years, 3 months ago (2015-09-08 04:09:44 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/260001
5 years, 3 months ago (2015-09-08 04:15:37 UTC) #43
commit-bot: I haz the power
Committed patchset #10 (id:260001)
5 years, 3 months ago (2015-09-08 05:06:36 UTC) #45
commit-bot: I haz the power
Patchset 10 (id:??) landed as https://crrev.com/ef268a83be4dead004047c25b702319ea4be7277 Cr-Commit-Position: refs/heads/master@{#30627}
5 years, 3 months ago (2015-09-08 05:06:56 UTC) #46
Benedikt Meurer
A revert of this CL (patchset #10 id:260001) has been created in https://codereview.chromium.org/1328963004/ by bmeurer@chromium.org. ...
5 years, 3 months ago (2015-09-08 06:11:56 UTC) #47
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/280001
5 years, 3 months ago (2015-09-08 06:26:17 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1311013008/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1311013008/280001
5 years, 3 months ago (2015-09-08 06:30:16 UTC) #53
commit-bot: I haz the power
Committed patchset #11 (id:280001)
5 years, 3 months ago (2015-09-08 07:50:27 UTC) #54
commit-bot: I haz the power
5 years, 3 months ago (2015-09-08 07:50:44 UTC) #55
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/ccbb4ff00f1d8f32fd9227cd7aba1723791e5744
Cr-Commit-Position: refs/heads/master@{#30629}

Powered by Google App Engine
This is Rietveld 408576698