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

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

Issue 2507143003: [ic] Pass globals' names to Runtime::kDeclareGlobals. (Closed)
Patch Set: Created 4 years, 1 month 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/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('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 11815 matching lines...) Expand 10 before | Expand all | Expand 10 after
11826 } 11826 }
11827 11827
11828 11828
11829 void HOptimizedGraphBuilder::VisitVariableDeclaration( 11829 void HOptimizedGraphBuilder::VisitVariableDeclaration(
11830 VariableDeclaration* declaration) { 11830 VariableDeclaration* declaration) {
11831 VariableProxy* proxy = declaration->proxy(); 11831 VariableProxy* proxy = declaration->proxy();
11832 Variable* variable = proxy->var(); 11832 Variable* variable = proxy->var();
11833 switch (variable->location()) { 11833 switch (variable->location()) {
11834 case VariableLocation::UNALLOCATED: { 11834 case VariableLocation::UNALLOCATED: {
11835 DCHECK(!variable->binding_needs_init()); 11835 DCHECK(!variable->binding_needs_init());
11836 globals_.Add(variable->name(), zone());
11836 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 11837 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
11837 DCHECK(!slot.IsInvalid()); 11838 DCHECK(!slot.IsInvalid());
11838 globals_.Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 11839 globals_.Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
11839 globals_.Add(isolate()->factory()->undefined_value(), zone()); 11840 globals_.Add(isolate()->factory()->undefined_value(), zone());
11840 return; 11841 return;
11841 } 11842 }
11842 case VariableLocation::PARAMETER: 11843 case VariableLocation::PARAMETER:
11843 case VariableLocation::LOCAL: 11844 case VariableLocation::LOCAL:
11844 if (variable->binding_needs_init()) { 11845 if (variable->binding_needs_init()) {
11845 HValue* value = graph()->GetConstantHole(); 11846 HValue* value = graph()->GetConstantHole();
(...skipping 18 matching lines...) Expand all
11864 } 11865 }
11865 } 11866 }
11866 11867
11867 11868
11868 void HOptimizedGraphBuilder::VisitFunctionDeclaration( 11869 void HOptimizedGraphBuilder::VisitFunctionDeclaration(
11869 FunctionDeclaration* declaration) { 11870 FunctionDeclaration* declaration) {
11870 VariableProxy* proxy = declaration->proxy(); 11871 VariableProxy* proxy = declaration->proxy();
11871 Variable* variable = proxy->var(); 11872 Variable* variable = proxy->var();
11872 switch (variable->location()) { 11873 switch (variable->location()) {
11873 case VariableLocation::UNALLOCATED: { 11874 case VariableLocation::UNALLOCATED: {
11875 globals_.Add(variable->name(), zone());
11874 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 11876 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
11875 DCHECK(!slot.IsInvalid()); 11877 DCHECK(!slot.IsInvalid());
11876 globals_.Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 11878 globals_.Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
11877 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( 11879 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo(
11878 declaration->fun(), current_info()->script(), top_info()); 11880 declaration->fun(), current_info()->script(), top_info());
11879 // Check for stack-overflow exception. 11881 // Check for stack-overflow exception.
11880 if (function.is_null()) return SetStackOverflow(); 11882 if (function.is_null()) return SetStackOverflow();
11881 globals_.Add(function, zone()); 11883 globals_.Add(function, zone());
11882 return; 11884 return;
11883 } 11885 }
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after
13023 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13025 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13024 } 13026 }
13025 13027
13026 #ifdef DEBUG 13028 #ifdef DEBUG
13027 graph_->Verify(false); // No full verify. 13029 graph_->Verify(false); // No full verify.
13028 #endif 13030 #endif
13029 } 13031 }
13030 13032
13031 } // namespace internal 13033 } // namespace internal
13032 } // namespace v8 13034 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen-instructions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698