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

Issue 2827013002: [turbofan] Constant-fold certain JSOrdinaryHasInstance nodes. (Closed)

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

Description

[turbofan] Constant-fold certain JSOrdinaryHasInstance nodes. Move JSOrdinaryHasInstance lowering to JSNativeContextSpecialization, which was previously mostly done in JSTypedLowering (for no reason). Add new logic to the lowering to constant-fold OrdinaryHasInstance checks when the map of the left-hand side and the "prototype" of the right-hand side is known. This address the performance issue with the (base) class constructors generated by Babel, i.e.: function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var C = function C() { _classCallCheck(this, C); }; for class C {} Also ensure that a known constructor being used inside an instanceof get's a proper initial map on-demand. BUG=v8:6275 R=mstarzinger@chromium.org Review-Url: https://codereview.chromium.org/2827013002 Cr-Commit-Position: refs/heads/master@{#44727} Committed: https://chromium.googlesource.com/v8/v8/+/c9c7dd0d4ea6c43dedab9f902b018eb5f2c5faf1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+240 lines, -154 lines) Patch
M src/compiler/js-native-context-specialization.h View 1 chunk +11 lines, -0 lines 0 comments Download
M src/compiler/js-native-context-specialization.cc View 3 chunks +214 lines, -2 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 2 chunks +3 lines, -152 lines 0 comments Download
M test/mjsunit/compiler/instanceof.js View 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (7 generated)
Benedikt Meurer
3 years, 8 months ago (2017-04-19 13:12:34 UTC) #1
Michael Starzinger
LGTM.
3 years, 8 months ago (2017-04-19 14:27:19 UTC) #6
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/2827013002/1
3 years, 8 months ago (2017-04-19 14:36:36 UTC) #8
commit-bot: I haz the power
3 years, 8 months ago (2017-04-19 14:38:17 UTC) #11
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/v8/v8/+/c9c7dd0d4ea6c43dedab9f902b018eb5f2c...

Powered by Google App Engine
This is Rietveld 408576698