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. #
Messages
Total messages: 13 (9 generated)
|