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

Issue 2042013003: [builtins] Properly optimize TypedArray/DataView accessors. (Closed)

Created:
4 years, 6 months ago by Benedikt Meurer
Modified:
4 years, 6 months ago
Reviewers:
Yang
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

[builtins] Properly optimize TypedArray/DataView accessors. The following getters were moved to the TypedArray/DataView prototype chain with ES2015, and hence need different treatment now: - DataView.prototype.buffer - DataView.prototype.byteLength - DataView.prototype.byteOffset - TypedArray.prototype.buffer - TypedArray.prototype.byteLength - TypedArray.prototype.byteOffset - TypedArray.prototype.length Instead of having special magic on the LoadIC in the IC system and the optimizing compilers, as we used to do before (and which we got rid of already), we just treat those as normal accessors and make them recognizable via the BuiltinFunctionId mechanism. This allows us to remove some of the additional magic from the IC subsystem, and just extend the BuiltinFunctionId mechanism in Crankshaft slightly to cover these cases too (TurboFan doesn't yet support accessors, but that will be fixed soonish anyways). This addresses most of the 15-20% regression we saw on the Octane GameBoy emulator benchmark. BUG=chromium:579905, chromium:593634, v8:4085, v8:5073 R=yangguo@chromium.org Committed: https://crrev.com/1ef737026565ea2becc84f30cfd432e581d50c6b Cr-Commit-Position: refs/heads/master@{#36782}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Remove some dead code from TurboFan. #

Patch Set 3 : Address Yang's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+355 lines, -221 lines) Patch
M src/bootstrapper.cc View 4 chunks +87 lines, -4 lines 0 comments Download
M src/builtins.h View 4 chunks +36 lines, -18 lines 0 comments Download
M src/builtins.cc View 1 2 1 chunk +113 lines, -0 lines 0 comments Download
M src/code-stubs.h View 2 chunks +0 lines, -26 lines 0 comments Download
M src/code-stubs-hydrogen.cc View 1 chunk +0 lines, -12 lines 0 comments Download
M src/compiler/access-info.h View 1 5 chunks +1 line, -14 lines 0 comments Download
M src/compiler/access-info.cc View 1 4 chunks +5 lines, -7 lines 0 comments Download
M src/compiler/js-native-context-specialization.cc View 1 1 chunk +0 lines, -25 lines 0 comments Download
M src/counters.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/crankshaft/hydrogen.h View 1 chunk +4 lines, -2 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 14 chunks +74 lines, -17 lines 0 comments Download
M src/heap-symbols.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/ic/handler-compiler.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/js/typedarray.js View 6 chunks +11 lines, -91 lines 0 comments Download
M src/objects.h View 2 chunks +10 lines, -1 line 0 comments Download
M src/objects.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M src/runtime/runtime.h View 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime/runtime-typedarray.cc View 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 11 (3 generated)
Benedikt Meurer
4 years, 6 months ago (2016-06-07 08:00:11 UTC) #1
Benedikt Meurer
Hey Yang, Here's the TypedArray/DataView prototype chain accessor fix. Please take a look. Thanks, Benedikt
4 years, 6 months ago (2016-06-07 08:00:56 UTC) #2
Yang
LGTM aside from nits. https://codereview.chromium.org/2042013003/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/2042013003/diff/1/src/builtins.cc#newcode3122 src/builtins.cc:3122: // Check if the {receiver}s ...
4 years, 6 months ago (2016-06-07 08:27:39 UTC) #3
Benedikt Meurer
https://codereview.chromium.org/2042013003/diff/1/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/2042013003/diff/1/src/builtins.cc#newcode3122 src/builtins.cc:3122: // Check if the {receiver}s JSArrayBuffer was neutered. On ...
4 years, 6 months ago (2016-06-07 09:24:36 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2042013003/40001
4 years, 6 months ago (2016-06-07 09:27:23 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 6 months ago (2016-06-07 09:56:04 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/1ef737026565ea2becc84f30cfd432e581d50c6b Cr-Commit-Position: refs/heads/master@{#36782}
4 years, 6 months ago (2016-06-07 09:58:10 UTC) #10
Michael Achenbach
4 years, 6 months ago (2016-06-07 11:27:12 UTC) #11
Message was sent while issue was closed.
A revert of this CL (patchset #3 id:40001) has been created in
https://codereview.chromium.org/2039093005/ by machenbach@chromium.org.

The reason for reverting is: Blink:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/bui....

Powered by Google App Engine
This is Rietveld 408576698