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

Issue 1523753002: [es6] Correct Function.prototype.apply, Reflect.construct and Reflect.apply. (Closed)

Created:
5 years ago by Benedikt Meurer
Modified:
4 years, 10 months ago
Reviewers:
Yang, paul.l...
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, akos.palfi.imgtec, Paul Lind, v8-arm-ports_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[es6] Correct Function.prototype.apply, Reflect.construct and Reflect.apply. Introduce a new Apply builtin that forms a correct and optimizable foundation for the Function.prototype.apply, Reflect.construct and Reflect.apply builtins (which properly does the PrepareForTailCall as required by the ES2015 spec). The new Apply builtin avoids going to the runtime if it is safe to just access the backing store elements of the argArray, i.e. if you pass a JSArray with no holes, or an unmapped, unmodified sloppy or strict arguments object. mips/mips64 ports by Balazs Kilvady <balazs.kilvady@imgtec.com>; CQ_INCLUDE_TRYBOTS=tryserver.v8:v8_linux64_tsan_rel BUG=v8:4413, v8:4430 LOG=n R=yangguo@chromium.org Committed: https://chromium.googlesource.com/v8/v8/+/e4d2538911f6cb4b626830ccbb3c1f5746542697 Committed: https://chromium.googlesource.com/v8/v8/+/5bd4832492e66b79b19a45653abc68bef3cd6cb4

Patch Set 1 #

Patch Set 2 : arm port. Small improvements. #

Total comments: 2

Patch Set 3 : mips port. #

Patch Set 4 : REBASE #

Patch Set 5 : arm64 port. #

Patch Set 6 : Mark mjsunit/apply as TIMEOUT (for tsan). #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1984 lines, -1264 lines) Patch
M src/arm/builtins-arm.cc View 1 2 3 2 chunks +283 lines, -150 lines 0 comments Download
M src/arm64/builtins-arm64.cc View 1 2 3 4 2 chunks +297 lines, -171 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 3 chunks +4 lines, -15 lines 0 comments Download
M src/builtins.h View 2 chunks +4 lines, -0 lines 0 comments Download
M src/contexts.h View 1 1 chunk +3 lines, -8 lines 0 comments Download
M src/ia32/builtins-ia32.cc View 1 2 3 2 chunks +320 lines, -169 lines 0 comments Download
M src/js/runtime.js View 1 2 3 2 chunks +0 lines, -124 lines 0 comments Download
M src/mips/builtins-mips.cc View 1 2 3 3 chunks +312 lines, -159 lines 0 comments Download
M src/mips64/builtins-mips64.cc View 1 2 3 2 chunks +311 lines, -159 lines 0 comments Download
M src/objects.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M src/objects.cc View 1 2 3 4 3 chunks +68 lines, -59 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M src/runtime/runtime-internal.cc View 3 chunks +24 lines, -1 line 0 comments Download
M src/type-feedback-vector.h View 1 chunk +0 lines, -4 lines 0 comments Download
M src/type-feedback-vector.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M src/x64/builtins-x64.cc View 1 2 3 2 chunks +325 lines, -170 lines 0 comments Download
M test/cctest/heap/test-heap.cc View 1 chunk +0 lines, -33 lines 0 comments Download
M test/mjsunit/apply.js View 2 chunks +2 lines, -2 lines 0 comments Download
M test/mjsunit/messages.js View 2 chunks +12 lines, -13 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M test/webkit/fast/js/function-apply.js View 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/fast/js/function-apply-expected.txt View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 31 (14 generated)
Benedikt Meurer
v8-mips-ports: Could you please port this CL to mips/mips64?
5 years ago (2015-12-14 13:39:38 UTC) #1
balazs.kilvady
We are working on it.
5 years ago (2015-12-14 14:29:22 UTC) #2
Benedikt Meurer
ARM people: Can you add arm64 port?
5 years ago (2015-12-14 14:46:00 UTC) #3
Rodolph Perfetta
On 2015/12/14 14:46:00, Benedikt Meurer wrote: > ARM people: Can you add arm64 port? We'll ...
5 years ago (2015-12-14 15:48:56 UTC) #4
Benedikt Meurer
Hey Yang, This removes 3 of the 4 last weird JS builtins, and optimizes Reflect.apply/construct ...
5 years ago (2015-12-15 05:37:52 UTC) #6
Yang
On 2015/12/15 05:37:52, Benedikt Meurer wrote: > Hey Yang, > > This removes 3 of ...
5 years ago (2015-12-15 06:06:49 UTC) #7
Yang
https://codereview.chromium.org/1523753002/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1523753002/diff/20001/src/bootstrapper.cc#newcode1870 src/bootstrapper.cc:1870: native_context->set_reflect_apply(*apply); You can move this to InitializeGlobal if you ...
5 years ago (2015-12-15 06:06:58 UTC) #8
Benedikt Meurer
https://codereview.chromium.org/1523753002/diff/20001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1523753002/diff/20001/src/bootstrapper.cc#newcode1870 src/bootstrapper.cc:1870: native_context->set_reflect_apply(*apply); Yes, my plan was to further simplify this ...
5 years ago (2015-12-15 06:08:28 UTC) #9
paul.l...
Benedikt, please find MIPS ports in https://codereview.chromium.org/1526253002
5 years ago (2015-12-16 01:03:41 UTC) #11
Benedikt Meurer
Thanks Paul and Balaz.
5 years ago (2015-12-16 04:50:47 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1523753002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1523753002/80001
5 years ago (2015-12-17 06:31:47 UTC) #16
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/e4d2538911f6cb4b626830ccbb3c1f5746542697 Cr-Commit-Position: refs/heads/master@{#32927}
5 years ago (2015-12-17 07:47:50 UTC) #20
Benedikt Meurer
Committed patchset #5 (id:80001) manually as e4d2538911f6cb4b626830ccbb3c1f5746542697 (presubmit successful).
5 years ago (2015-12-17 07:47:53 UTC) #21
Benedikt Meurer
A revert of this CL (patchset #5 id:80001) has been created in https://codereview.chromium.org/1533803002/ by bmeurer@chromium.org. ...
5 years ago (2015-12-17 08:05:28 UTC) #22
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/5bd4832492e66b79b19a45653abc68bef3cd6cb4 Cr-Commit-Position: refs/heads/master@{#32929}
5 years ago (2015-12-17 08:41:25 UTC) #28
Benedikt Meurer
Committed patchset #6 (id:100001) manually as 5bd4832492e66b79b19a45653abc68bef3cd6cb4 (presubmit successful).
5 years ago (2015-12-17 08:41:30 UTC) #30
Michael Achenbach
4 years, 10 months ago (2016-02-04 10:49:00 UTC) #31
Message was sent while issue was closed.
On 2015/12/17 08:41:30, Benedikt Meurer wrote:
> Committed patchset #6 (id:100001) manually as
> 5bd4832492e66b79b19a45653abc68bef3cd6cb4 (presubmit successful).

Note that this makes the test mjsunit/apply a lot (100X) slower in stress mode.
Could you make that test faster again? Otherwise we need a skip.

Powered by Google App Engine
This is Rietveld 408576698