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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/x87/lithium-codegen-x87.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/full-codegen/full-codegen.h" 7 #include "src/full-codegen/full-codegen.h"
8 #include "src/ast/compile-time-value.h" 8 #include "src/ast/compile-time-value.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 } 776 }
777 777
778 778
779 void FullCodeGenerator::VisitVariableDeclaration( 779 void FullCodeGenerator::VisitVariableDeclaration(
780 VariableDeclaration* declaration) { 780 VariableDeclaration* declaration) {
781 VariableProxy* proxy = declaration->proxy(); 781 VariableProxy* proxy = declaration->proxy();
782 Variable* variable = proxy->var(); 782 Variable* variable = proxy->var();
783 switch (variable->location()) { 783 switch (variable->location()) {
784 case VariableLocation::UNALLOCATED: { 784 case VariableLocation::UNALLOCATED: {
785 DCHECK(!variable->binding_needs_init()); 785 DCHECK(!variable->binding_needs_init());
786 globals_->Add(variable->name(), zone());
786 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 787 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
787 DCHECK(!slot.IsInvalid()); 788 DCHECK(!slot.IsInvalid());
788 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 789 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
789 globals_->Add(isolate()->factory()->undefined_value(), zone()); 790 globals_->Add(isolate()->factory()->undefined_value(), zone());
790 break; 791 break;
791 } 792 }
792 case VariableLocation::PARAMETER: 793 case VariableLocation::PARAMETER:
793 case VariableLocation::LOCAL: 794 case VariableLocation::LOCAL:
794 if (variable->binding_needs_init()) { 795 if (variable->binding_needs_init()) {
795 Comment cmnt(masm_, "[ VariableDeclaration"); 796 Comment cmnt(masm_, "[ VariableDeclaration");
(...skipping 29 matching lines...) Expand all
825 } 826 }
826 } 827 }
827 828
828 829
829 void FullCodeGenerator::VisitFunctionDeclaration( 830 void FullCodeGenerator::VisitFunctionDeclaration(
830 FunctionDeclaration* declaration) { 831 FunctionDeclaration* declaration) {
831 VariableProxy* proxy = declaration->proxy(); 832 VariableProxy* proxy = declaration->proxy();
832 Variable* variable = proxy->var(); 833 Variable* variable = proxy->var();
833 switch (variable->location()) { 834 switch (variable->location()) {
834 case VariableLocation::UNALLOCATED: { 835 case VariableLocation::UNALLOCATED: {
836 globals_->Add(variable->name(), zone());
835 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 837 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
836 DCHECK(!slot.IsInvalid()); 838 DCHECK(!slot.IsInvalid());
837 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 839 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
838 Handle<SharedFunctionInfo> function = 840 Handle<SharedFunctionInfo> function =
839 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 841 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
840 // Check for stack-overflow exception. 842 // Check for stack-overflow exception.
841 if (function.is_null()) return SetStackOverflow(); 843 if (function.is_null()) return SetStackOverflow();
842 globals_->Add(function, zone()); 844 globals_->Add(function, zone());
843 break; 845 break;
844 } 846 }
(...skipping 2848 matching lines...) Expand 10 before | Expand all | Expand 10 after
3693 DCHECK(interrupt_address == 3695 DCHECK(interrupt_address ==
3694 isolate->builtins()->OnStackReplacement()->entry()); 3696 isolate->builtins()->OnStackReplacement()->entry());
3695 return ON_STACK_REPLACEMENT; 3697 return ON_STACK_REPLACEMENT;
3696 } 3698 }
3697 3699
3698 3700
3699 } // namespace internal 3701 } // namespace internal
3700 } // namespace v8 3702 } // namespace v8
3701 3703
3702 #endif // V8_TARGET_ARCH_ARM 3704 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698