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

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

Issue 2634283003: [TypeFeedbackVector] DeclareGlobals needs a literals array (Closed)
Patch Set: Don't exploit the literals array yet. 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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.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_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 VariableProxy* proxy = declaration->proxy(); 753 VariableProxy* proxy = declaration->proxy();
754 Variable* variable = proxy->var(); 754 Variable* variable = proxy->var();
755 switch (variable->location()) { 755 switch (variable->location()) {
756 case VariableLocation::UNALLOCATED: { 756 case VariableLocation::UNALLOCATED: {
757 DCHECK(!variable->binding_needs_init()); 757 DCHECK(!variable->binding_needs_init());
758 globals_->Add(variable->name(), zone()); 758 globals_->Add(variable->name(), zone());
759 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 759 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
760 DCHECK(!slot.IsInvalid()); 760 DCHECK(!slot.IsInvalid());
761 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 761 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
762 globals_->Add(isolate()->factory()->undefined_value(), zone()); 762 globals_->Add(isolate()->factory()->undefined_value(), zone());
763 globals_->Add(isolate()->factory()->undefined_value(), zone());
763 break; 764 break;
764 } 765 }
765 case VariableLocation::PARAMETER: 766 case VariableLocation::PARAMETER:
766 case VariableLocation::LOCAL: 767 case VariableLocation::LOCAL:
767 if (variable->binding_needs_init()) { 768 if (variable->binding_needs_init()) {
768 Comment cmnt(masm_, "[ VariableDeclaration"); 769 Comment cmnt(masm_, "[ VariableDeclaration");
769 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex); 770 __ LoadRoot(a4, Heap::kTheHoleValueRootIndex);
770 __ sd(a4, StackOperand(variable)); 771 __ sd(a4, StackOperand(variable));
771 } 772 }
772 break; 773 break;
(...skipping 19 matching lines...) Expand all
792 void FullCodeGenerator::VisitFunctionDeclaration( 793 void FullCodeGenerator::VisitFunctionDeclaration(
793 FunctionDeclaration* declaration) { 794 FunctionDeclaration* declaration) {
794 VariableProxy* proxy = declaration->proxy(); 795 VariableProxy* proxy = declaration->proxy();
795 Variable* variable = proxy->var(); 796 Variable* variable = proxy->var();
796 switch (variable->location()) { 797 switch (variable->location()) {
797 case VariableLocation::UNALLOCATED: { 798 case VariableLocation::UNALLOCATED: {
798 globals_->Add(variable->name(), zone()); 799 globals_->Add(variable->name(), zone());
799 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 800 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
800 DCHECK(!slot.IsInvalid()); 801 DCHECK(!slot.IsInvalid());
801 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 802 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
803
804 // We need the slot where the literals array lives, too.
805 slot = declaration->fun()->LiteralFeedbackSlot();
806 DCHECK(!slot.IsInvalid());
807 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
808
802 Handle<SharedFunctionInfo> function = 809 Handle<SharedFunctionInfo> function =
803 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 810 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
804 // Check for stack-overflow exception. 811 // Check for stack-overflow exception.
805 if (function.is_null()) return SetStackOverflow(); 812 if (function.is_null()) return SetStackOverflow();
806 globals_->Add(function, zone()); 813 globals_->Add(function, zone());
807 break; 814 break;
808 } 815 }
809 816
810 case VariableLocation::PARAMETER: 817 case VariableLocation::PARAMETER:
811 case VariableLocation::LOCAL: { 818 case VariableLocation::LOCAL: {
(...skipping 2059 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 reinterpret_cast<uint64_t>( 2878 reinterpret_cast<uint64_t>(
2872 isolate->builtins()->OnStackReplacement()->entry())); 2879 isolate->builtins()->OnStackReplacement()->entry()));
2873 return ON_STACK_REPLACEMENT; 2880 return ON_STACK_REPLACEMENT;
2874 } 2881 }
2875 2882
2876 2883
2877 } // namespace internal 2884 } // namespace internal
2878 } // namespace v8 2885 } // namespace v8
2879 2886
2880 #endif // V8_TARGET_ARCH_MIPS64 2887 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698