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

Issue 2841463002: [turbofan] Also constant-fold Object.getPrototypeOf if possible. (Closed)

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

Description

[turbofan] Also constant-fold Object.getPrototypeOf if possible. We already have an optimization to constant-fold access to an object's prototype via the special __proto__ accessor (specified in appendix B). We can use the same optimization to also constant-fold accesses to an object's prototype via the official Object.getPrototypeOf function. Also add the optimization for Reflect.getPrototypeOf, which is equivalent for object inputs. This is commonly used by Babel to implement various new language features, for example subclassing and certain property lookups. R=yangguo@chromium.org BUG=v8:6292 Review-Url: https://codereview.chromium.org/2841463002 Cr-Commit-Position: refs/heads/master@{#44788} Committed: https://chromium.googlesource.com/v8/v8/+/359b5f93d4a0f5e07c2bed54e6f52abacec43285

Patch Set 1 #

Patch Set 2 : Exclude primitives. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -18 lines) Patch
M src/compiler/js-call-reducer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M src/compiler/js-call-reducer.cc View 1 3 chunks +49 lines, -18 lines 0 comments Download
A test/mjsunit/compiler/object-getprototypeof.js View 1 chunk +15 lines, -0 lines 0 comments Download
A test/mjsunit/compiler/reflect-getprototypeof.js View 1 chunk +15 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (9 generated)
Benedikt Meurer
3 years, 8 months ago (2017-04-24 05:10:57 UTC) #1
Yang
On 2017/04/24 05:10:57, Benedikt Meurer wrote: lgtm.
3 years, 8 months ago (2017-04-24 05:14:12 UTC) #7
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/2841463002/20001
3 years, 8 months ago (2017-04-24 05:23:13 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2017-04-24 05:38:00 UTC) #13
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/359b5f93d4a0f5e07c2bed54e6f52abacec...

Powered by Google App Engine
This is Rietveld 408576698