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

Unified Diff: src/hydrogen.cc

Issue 1173333004: Add script context with context-allocated "const this" (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fix gcmole error in bootstrapper.cc Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 810a8b92210d4bb2389d024490c65b0b88e22eb1..ecf05f4bc53555367cf1c19c649c6be9d2d0b0d3 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -10197,12 +10197,11 @@ void HOptimizedGraphBuilder::VisitDelete(UnaryOperation* expr) {
if (var->IsUnallocated()) {
Bailout(kDeleteWithGlobalVariable);
} else if (var->IsStackAllocated() || var->IsContextSlot()) {
- // Result of deleting non-global variables is false. 'this' is not
- // really a variable, though we implement it as one. The
- // subexpression does not have side effects.
- HValue* value = var->is_this()
- ? graph()->GetConstantTrue()
- : graph()->GetConstantFalse();
+ // Result of deleting non-global variables is false. 'this' is not really
+ // a variable, though we implement it as one. The subexpression does not
+ // have side effects.
+ HValue* value = var->HasThisName(isolate()) ? graph()->GetConstantTrue()
+ : graph()->GetConstantFalse();
return ast_context()->ReturnValue(value);
} else {
Bailout(kDeleteWithNonGlobalVariable);
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698