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

Issue 2814773005: [js] Avoid %_ClassOf for collection builtins. (Closed)

Created:
3 years, 8 months ago by Benedikt Meurer
Modified:
3 years, 7 months ago
Reviewers:
Jarin, adamk, rmcilroy
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[js] Avoid %_ClassOf for collection builtins. The collection builtins (Map, Set, WeakMap, WeakSet) are still written in JavaScript and make heavy use of %_ClassOf, which is kind of expensive compared to a simple instance type check. Change that to use simple instance type checks instead. R=jarin@chromium.org BUG=v8:6261, v8:6278, v8:6344 Review-Url: https://codereview.chromium.org/2814773005 Cr-Original-Commit-Position: refs/heads/master@{#45106} Committed: https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521c0852 Review-Url: https://codereview.chromium.org/2814773005 Cr-Commit-Position: refs/heads/master@{#45124} Committed: https://chromium.googlesource.com/v8/v8/+/516d8438adc44bfab2d99e90d23532fc92dfff1f

Patch Set 1 #

Patch Set 2 : Make debug-evaluate happy. #

Total comments: 2

Patch Set 3 : Address comment from adamk@. REBASE. #

Patch Set 4 : Skip failing inspector test in noturbofan variant (issue related to missing source position in ToBo… #

Patch Set 5 : Remove the IsJSGlobalProxy magic. #

Patch Set 6 : Disable the failing test for CS again. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -8 lines) Patch
M src/compiler/js-intrinsic-lowering.cc View 1 2 3 4 1 chunk +12 lines, -0 lines 2 comments Download
M src/compiler/linkage.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M src/debug/debug-evaluate.cc View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M src/js/macros.py View 1 2 3 4 1 chunk +6 lines, -7 lines 0 comments Download
M src/runtime/runtime.h View 1 2 1 chunk +7 lines, -1 line 0 comments Download
M src/runtime/runtime-collections.cc View 1 chunk +43 lines, -0 lines 0 comments Download
M test/inspector/inspector.status View 1 2 3 5 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (33 generated)
Benedikt Meurer
3 years, 8 months ago (2017-04-13 11:18:17 UTC) #1
Jarin
lgtm
3 years, 8 months ago (2017-04-13 11:20:31 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/1
3 years, 8 months ago (2017-04-13 11:20:47 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/builds/16779) v8_linux64_gyp_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
3 years, 8 months ago (2017-04-13 11:39:47 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/20001
3 years, 8 months ago (2017-04-13 12:03:22 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_verify_csa_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_verify_csa_rel_ng/builds/4412) v8_linux64_verify_csa_rel_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
3 years, 8 months ago (2017-04-13 12:23:51 UTC) #14
adamk
Is this ready to land? I was about to write up something similar myself but ...
3 years, 7 months ago (2017-05-02 22:09:41 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/20001
3 years, 7 months ago (2017-05-03 02:06:59 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_mipsel_compile_rel on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mipsel_compile_rel/builds/33767) v8_linux_nodcheck_rel_ng on master.tryserver.v8 (JOB_FAILED, ...
3 years, 7 months ago (2017-05-03 02:08:29 UTC) #20
Benedikt Meurer
On 2017/05/02 22:09:41, adamk wrote: > Is this ready to land? I was about to ...
3 years, 7 months ago (2017-05-03 02:48:09 UTC) #21
adamk
On 2017/05/03 02:48:09, Benedikt Meurer wrote: > On 2017/05/02 22:09:41, adamk wrote: > > Is ...
3 years, 7 months ago (2017-05-03 22:54:31 UTC) #22
adamk
On 2017/05/03 22:54:31, adamk wrote: > On 2017/05/03 02:48:09, Benedikt Meurer wrote: > > On ...
3 years, 7 months ago (2017-05-03 23:01:35 UTC) #23
adamk
https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrinsic-lowering.cc File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrinsic-lowering.cc#newcode57 src/compiler/js-intrinsic-lowering.cc:57: case Runtime::kInlineIsJSGlobalProxy: You can also add these to the ...
3 years, 7 months ago (2017-05-04 17:31:28 UTC) #24
Benedikt Meurer
https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrinsic-lowering.cc File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/20001/src/compiler/js-intrinsic-lowering.cc#newcode57 src/compiler/js-intrinsic-lowering.cc:57: case Runtime::kInlineIsJSGlobalProxy: Good catch, done!
3 years, 7 months ago (2017-05-04 17:50:53 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/60001
3 years, 7 months ago (2017-05-04 18:00:05 UTC) #33
commit-bot: I haz the power
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/v8/v8/+/28170099fd1efc84a724ef133f335fec521c0852
3 years, 7 months ago (2017-05-04 18:27:45 UTC) #37
Benedikt Meurer
A revert of this CL (patchset #4 id:60001) has been created in https://codereview.chromium.org/2860123002/ by bmeurer@chromium.org. ...
3 years, 7 months ago (2017-05-04 18:43:22 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/80001
3 years, 7 months ago (2017-05-05 09:14:24 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_dbg_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_dbg_ng/builds/25515) v8_linux_dbg_ng_triggered on master.tryserver.v8 (JOB_FAILED, ...
3 years, 7 months ago (2017-05-05 09:41:21 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2814773005/100001
3 years, 7 months ago (2017-05-05 09:53:53 UTC) #50
commit-bot: I haz the power
Committed patchset #6 (id:100001) as https://chromium.googlesource.com/v8/v8/+/516d8438adc44bfab2d99e90d23532fc92dfff1f
3 years, 7 months ago (2017-05-05 10:22:27 UTC) #53
rmcilroy
https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrinsic-lowering.cc File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrinsic-lowering.cc#newcode70 src/compiler/js-intrinsic-lowering.cc:70: return ReduceIsInstanceType(node, JS_WEAK_SET_TYPE); Does it make sense to add ...
3 years, 7 months ago (2017-05-05 13:45:31 UTC) #55
Benedikt Meurer
https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrinsic-lowering.cc File src/compiler/js-intrinsic-lowering.cc (right): https://codereview.chromium.org/2814773005/diff/100001/src/compiler/js-intrinsic-lowering.cc#newcode70 src/compiler/js-intrinsic-lowering.cc:70: return ReduceIsInstanceType(node, JS_WEAK_SET_TYPE); Ideally this code should be obsolete ...
3 years, 7 months ago (2017-05-05 14:00:58 UTC) #56
adamk
On 2017/05/04 18:43:22, Benedikt Meurer wrote: > A revert of this CL (patchset #4 id:60001) ...
3 years, 7 months ago (2017-05-17 19:22:31 UTC) #57
Benedikt Meurer
3 years, 7 months ago (2017-05-17 19:23:55 UTC) #58
Message was sent while issue was closed.
On 2017/05/17 19:22:31, adamk wrote:
> On 2017/05/04 18:43:22, Benedikt Meurer wrote:
> > A revert of this CL (patchset #4 id:60001) has been created in
> > https://codereview.chromium.org/2860123002/ by mailto:bmeurer@chromium.org.
> > 
> > The reason for reverting is: Breaks node.js integration bot:
> >
>
https://build.chromium.org/p/client.v8.fyi/builders/V8%20-%20node.js%20integr....
> 
> What was the particular breakage here? It looks to me like the overhead of the
> %_ClassOf check for IS_GLOBAL is still noticeable in JS version of
> GetExistingHash() when called on a JSReceiver.

It was failing for bizarre reasons that I couldn't understand. I didn't spend a
lot of time investigating, so it might be possible to make it work.

Powered by Google App Engine
This is Rietveld 408576698