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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2231813003: Make Variable::is_this always return the correct value (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10582 matching lines...) Expand 10 before | Expand all | Expand 10 after
10593 2); 10593 2);
10594 return ast_context()->ReturnInstruction(instr, expr->id()); 10594 return ast_context()->ReturnInstruction(instr, expr->id());
10595 } else if (proxy != NULL) { 10595 } else if (proxy != NULL) {
10596 Variable* var = proxy->var(); 10596 Variable* var = proxy->var();
10597 if (var->IsUnallocatedOrGlobalSlot()) { 10597 if (var->IsUnallocatedOrGlobalSlot()) {
10598 Bailout(kDeleteWithGlobalVariable); 10598 Bailout(kDeleteWithGlobalVariable);
10599 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 10599 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
10600 // Result of deleting non-global variables is false. 'this' is not really 10600 // Result of deleting non-global variables is false. 'this' is not really
10601 // a variable, though we implement it as one. The subexpression does not 10601 // a variable, though we implement it as one. The subexpression does not
10602 // have side effects. 10602 // have side effects.
10603 HValue* value = var->HasThisName(isolate()) ? graph()->GetConstantTrue() 10603 HValue* value = var->is_this() ? graph()->GetConstantTrue()
10604 : graph()->GetConstantFalse(); 10604 : graph()->GetConstantFalse();
10605 return ast_context()->ReturnValue(value); 10605 return ast_context()->ReturnValue(value);
10606 } else { 10606 } else {
10607 Bailout(kDeleteWithNonGlobalVariable); 10607 Bailout(kDeleteWithNonGlobalVariable);
10608 } 10608 }
10609 } else { 10609 } else {
10610 // Result of deleting non-property, non-variable reference is true. 10610 // Result of deleting non-property, non-variable reference is true.
10611 // Evaluate the subexpression for side effects. 10611 // Evaluate the subexpression for side effects.
10612 CHECK_ALIVE(VisitForEffect(expr->expression())); 10612 CHECK_ALIVE(VisitForEffect(expr->expression()));
10613 return ast_context()->ReturnValue(graph()->GetConstantTrue()); 10613 return ast_context()->ReturnValue(graph()->GetConstantTrue());
10614 } 10614 }
(...skipping 2818 matching lines...) Expand 10 before | Expand all | Expand 10 after
13433 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13433 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13434 } 13434 }
13435 13435
13436 #ifdef DEBUG 13436 #ifdef DEBUG
13437 graph_->Verify(false); // No full verify. 13437 graph_->Verify(false); // No full verify.
13438 #endif 13438 #endif
13439 } 13439 }
13440 13440
13441 } // namespace internal 13441 } // namespace internal
13442 } // namespace v8 13442 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/full-codegen/arm/full-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698