Chromium Code Reviews

Unified Diff: src/compiler/ast-graph-builder.cc

Issue 1120093002: Only swap undefined for the global object if necessary in the prologue (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove flag Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.cc
diff --git a/src/compiler/ast-graph-builder.cc b/src/compiler/ast-graph-builder.cc
index e62e34ef07809b8ee0062614472d09699ac820ce..88422886edeea86ac4d6e8ab9d48cee772484d04 100644
--- a/src/compiler/ast-graph-builder.cc
+++ b/src/compiler/ast-graph-builder.cc
@@ -2642,10 +2642,7 @@ Node* AstGraphBuilder::BuildPatchReceiverToGlobalProxy(Node* receiver) {
// There is no need to perform patching if the receiver is never used. Note
// that scope predicates are purely syntactical, a call to eval might still
// inspect the receiver value.
- if (!info()->scope()->uses_this() && !info()->scope()->inner_uses_this() &&
- !info()->scope()->calls_sloppy_eval()) {
- return receiver;
- }
+ if (!info()->MayUseThis()) return receiver;
IfBuilder receiver_check(this);
Node* undefined = jsgraph()->UndefinedConstant();
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine