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

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

Issue 2287173002: Replace CollectVariables with locals(), update callsites to walk locals instead (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: restore undefined handling Created 4 years, 3 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/contexts.cc ('k') | src/crankshaft/typing.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 10572 matching lines...) Expand 10 before | Expand all | Expand 10 after
10583 HValue* obj = Pop(); 10583 HValue* obj = Pop();
10584 Add<HPushArguments>(obj, key); 10584 Add<HPushArguments>(obj, key);
10585 HInstruction* instr = New<HCallRuntime>( 10585 HInstruction* instr = New<HCallRuntime>(
10586 Runtime::FunctionForId(is_strict(function_language_mode()) 10586 Runtime::FunctionForId(is_strict(function_language_mode())
10587 ? Runtime::kDeleteProperty_Strict 10587 ? Runtime::kDeleteProperty_Strict
10588 : Runtime::kDeleteProperty_Sloppy), 10588 : Runtime::kDeleteProperty_Sloppy),
10589 2); 10589 2);
10590 return ast_context()->ReturnInstruction(instr, expr->id()); 10590 return ast_context()->ReturnInstruction(instr, expr->id());
10591 } else if (proxy != NULL) { 10591 } else if (proxy != NULL) {
10592 Variable* var = proxy->var(); 10592 Variable* var = proxy->var();
10593 if (var->IsUnallocatedOrGlobalSlot()) { 10593 if (var->IsUnallocated()) {
10594 Bailout(kDeleteWithGlobalVariable); 10594 Bailout(kDeleteWithGlobalVariable);
10595 } else if (var->IsStackAllocated() || var->IsContextSlot()) { 10595 } else if (var->IsStackAllocated() || var->IsContextSlot()) {
10596 // Result of deleting non-global variables is false. 'this' is not really 10596 // Result of deleting non-global variables is false. 'this' is not really
10597 // a variable, though we implement it as one. The subexpression does not 10597 // a variable, though we implement it as one. The subexpression does not
10598 // have side effects. 10598 // have side effects.
10599 HValue* value = var->is_this() ? graph()->GetConstantTrue() 10599 HValue* value = var->is_this() ? graph()->GetConstantTrue()
10600 : graph()->GetConstantFalse(); 10600 : graph()->GetConstantFalse();
10601 return ast_context()->ReturnValue(value); 10601 return ast_context()->ReturnValue(value);
10602 } else { 10602 } else {
10603 Bailout(kDeleteWithNonGlobalVariable); 10603 Bailout(kDeleteWithNonGlobalVariable);
(...skipping 2825 matching lines...) Expand 10 before | Expand all | Expand 10 after
13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13429 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13430 } 13430 }
13431 13431
13432 #ifdef DEBUG 13432 #ifdef DEBUG
13433 graph_->Verify(false); // No full verify. 13433 graph_->Verify(false); // No full verify.
13434 #endif 13434 #endif
13435 } 13435 }
13436 13436
13437 } // namespace internal 13437 } // namespace internal
13438 } // namespace v8 13438 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698