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

Side by Side Diff: src/full-codegen/ppc/full-codegen-ppc.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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 VariableProxy* proxy = declaration->proxy(); 722 VariableProxy* proxy = declaration->proxy();
723 Variable* variable = proxy->var(); 723 Variable* variable = proxy->var();
724 DCHECK(!variable->binding_needs_init()); 724 DCHECK(!variable->binding_needs_init());
725 switch (variable->location()) { 725 switch (variable->location()) {
726 case VariableLocation::UNALLOCATED: { 726 case VariableLocation::UNALLOCATED: {
727 globals_->Add(variable->name(), zone()); 727 globals_->Add(variable->name(), zone());
728 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 728 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
729 DCHECK(!slot.IsInvalid()); 729 DCHECK(!slot.IsInvalid());
730 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 730 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
731 globals_->Add(isolate()->factory()->undefined_value(), zone()); 731 globals_->Add(isolate()->factory()->undefined_value(), zone());
732 globals_->Add(isolate()->factory()->undefined_value(), zone());
733 break; 732 break;
734 } 733 }
735 case VariableLocation::PARAMETER: 734 case VariableLocation::PARAMETER:
736 case VariableLocation::LOCAL: 735 case VariableLocation::LOCAL:
737 case VariableLocation::CONTEXT: 736 case VariableLocation::CONTEXT:
738 break; 737 break;
739 738
740 case VariableLocation::LOOKUP: 739 case VariableLocation::LOOKUP:
741 case VariableLocation::MODULE: 740 case VariableLocation::MODULE:
742 UNREACHABLE(); 741 UNREACHABLE();
743 } 742 }
744 } 743 }
745 744
746 745
747 void FullCodeGenerator::VisitFunctionDeclaration( 746 void FullCodeGenerator::VisitFunctionDeclaration(
748 FunctionDeclaration* declaration) { 747 FunctionDeclaration* declaration) {
749 VariableProxy* proxy = declaration->proxy(); 748 VariableProxy* proxy = declaration->proxy();
750 Variable* variable = proxy->var(); 749 Variable* variable = proxy->var();
751 switch (variable->location()) { 750 switch (variable->location()) {
752 case VariableLocation::UNALLOCATED: { 751 case VariableLocation::UNALLOCATED: {
753 globals_->Add(variable->name(), zone()); 752 globals_->Add(variable->name(), zone());
754 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); 753 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot();
755 DCHECK(!slot.IsInvalid()); 754 DCHECK(!slot.IsInvalid());
756 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); 755 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
757
758 // We need the slot where the literals array lives, too.
759 slot = declaration->fun()->LiteralFeedbackSlot();
760 DCHECK(!slot.IsInvalid());
761 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone());
762
763 Handle<SharedFunctionInfo> function = 756 Handle<SharedFunctionInfo> function =
764 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); 757 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_);
765 // Check for stack-overflow exception. 758 // Check for stack-overflow exception.
766 if (function.is_null()) return SetStackOverflow(); 759 if (function.is_null()) return SetStackOverflow();
767 globals_->Add(function, zone()); 760 globals_->Add(function, zone());
768 break; 761 break;
769 } 762 }
770 763
771 case VariableLocation::PARAMETER: 764 case VariableLocation::PARAMETER:
772 case VariableLocation::LOCAL: { 765 case VariableLocation::LOCAL: {
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
2779 2772
2780 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 2773 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
2781 2774
2782 DCHECK(interrupt_address == 2775 DCHECK(interrupt_address ==
2783 isolate->builtins()->OnStackReplacement()->entry()); 2776 isolate->builtins()->OnStackReplacement()->entry());
2784 return ON_STACK_REPLACEMENT; 2777 return ON_STACK_REPLACEMENT;
2785 } 2778 }
2786 } // namespace internal 2779 } // namespace internal
2787 } // namespace v8 2780 } // namespace v8
2788 #endif // V8_TARGET_ARCH_PPC 2781 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698