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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.cc

Issue 2645543002: Back strongly rooted literals CLs out of the tree for branch cut (Closed)
Patch Set: Created 3 years, 11 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/crankshaft/hydrogen.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/ast/compile-time-value.h" 7 #include "src/ast/compile-time-value.h"
8 #include "src/ast/scopes.h" 8 #include "src/ast/scopes.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 VariableProxy* proxy = declaration->proxy(); 754 VariableProxy* proxy = declaration->proxy();
755 Variable* variable = proxy->var(); 755 Variable* variable = proxy->var();
756 DCHECK(!variable->binding_needs_init()); 756 DCHECK(!variable->binding_needs_init());
757 switch (variable->location()) { 757 switch (variable->location()) {
758 case VariableLocation::UNALLOCATED: { 758 case VariableLocation::UNALLOCATED: {
759 globals_->Add(variable->name(), zone()); 759 globals_->Add(variable->name(), zone());
760 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 760 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
761 DCHECK(!slot.IsInvalid()); 761 DCHECK(!slot.IsInvalid());
762 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 762 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
763 globals_->Add(isolate()->factory()->undefined_value(), zone()); 763 globals_->Add(isolate()->factory()->undefined_value(), zone());
764 globals_->Add(isolate()->factory()->undefined_value(), zone());
765 break; 764 break;
766 } 765 }
767 case VariableLocation::PARAMETER: 766 case VariableLocation::PARAMETER:
768 case VariableLocation::LOCAL: 767 case VariableLocation::LOCAL:
769 case VariableLocation::CONTEXT: 768 case VariableLocation::CONTEXT:
770 break; 769 break;
771 770
772 case VariableLocation::LOOKUP: 771 case VariableLocation::LOOKUP:
773 case VariableLocation::MODULE: 772 case VariableLocation::MODULE:
774 UNREACHABLE(); 773 UNREACHABLE();
775 } 774 }
776 } 775 }
777 776
778 777
779 void FullCodeGenerator::VisitFunctionDeclaration( 778 void FullCodeGenerator::VisitFunctionDeclaration(
780 FunctionDeclaration* declaration) { 779 FunctionDeclaration* declaration) {
781 VariableProxy* proxy = declaration->proxy(); 780 VariableProxy* proxy = declaration->proxy();
782 Variable* variable = proxy->var(); 781 Variable* variable = proxy->var();
783 switch (variable->location()) { 782 switch (variable->location()) {
784 case VariableLocation::UNALLOCATED: { 783 case VariableLocation::UNALLOCATED: {
785 globals_->Add(variable->name(), zone()); 784 globals_->Add(variable->name(), zone());
786 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 785 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
787 DCHECK(!slot.IsInvalid()); 786 DCHECK(!slot.IsInvalid());
788 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 787 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
789
790 // We need the slot where the literals array lives, too.
791 slot = declaration->fun()->LiteralFeedbackSlot();
792 DCHECK(!slot.IsInvalid());
793 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
794
795 Handle<SharedFunctionInfo> function = 788 Handle<SharedFunctionInfo> function =
796 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 789 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
797 // Check for stack-overflow exception. 790 // Check for stack-overflow exception.
798 if (function.is_null()) return SetStackOverflow(); 791 if (function.is_null()) return SetStackOverflow();
799 globals_->Add(function, zone()); 792 globals_->Add(function, zone());
800 break; 793 break;
801 } 794 }
802 795
803 case VariableLocation::PARAMETER: 796 case VariableLocation::PARAMETER:
804 case VariableLocation::LOCAL: { 797 case VariableLocation::LOCAL: {
(...skipping 2035 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 DCHECK(interrupt_address == 2833 DCHECK(interrupt_address ==
2841 isolate->builtins()->OnStackReplacement()->entry()); 2834 isolate->builtins()->OnStackReplacement()->entry());
2842 return ON_STACK_REPLACEMENT; 2835 return ON_STACK_REPLACEMENT;
2843 } 2836 }
2844 2837
2845 2838
2846 } // namespace internal 2839 } // namespace internal
2847 } // namespace v8 2840 } // namespace v8
2848 2841
2849 #endif // V8_TARGET_ARCH_ARM 2842 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen.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