OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 VariableProxy* proxy = declaration->proxy(); | 695 VariableProxy* proxy = declaration->proxy(); |
696 Variable* variable = proxy->var(); | 696 Variable* variable = proxy->var(); |
697 switch (variable->location()) { | 697 switch (variable->location()) { |
698 case VariableLocation::UNALLOCATED: { | 698 case VariableLocation::UNALLOCATED: { |
699 DCHECK(!variable->binding_needs_init()); | 699 DCHECK(!variable->binding_needs_init()); |
700 globals_->Add(variable->name(), zone()); | 700 globals_->Add(variable->name(), zone()); |
701 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 701 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
702 DCHECK(!slot.IsInvalid()); | 702 DCHECK(!slot.IsInvalid()); |
703 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 703 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
704 globals_->Add(isolate()->factory()->undefined_value(), zone()); | 704 globals_->Add(isolate()->factory()->undefined_value(), zone()); |
| 705 globals_->Add(isolate()->factory()->undefined_value(), zone()); |
705 break; | 706 break; |
706 } | 707 } |
707 case VariableLocation::PARAMETER: | 708 case VariableLocation::PARAMETER: |
708 case VariableLocation::LOCAL: | 709 case VariableLocation::LOCAL: |
709 if (variable->binding_needs_init()) { | 710 if (variable->binding_needs_init()) { |
710 Comment cmnt(masm_, "[ VariableDeclaration"); | 711 Comment cmnt(masm_, "[ VariableDeclaration"); |
711 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 712 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
712 __ StoreP(ip, StackOperand(variable)); | 713 __ StoreP(ip, StackOperand(variable)); |
713 } | 714 } |
714 break; | 715 break; |
(...skipping 18 matching lines...) Expand all Loading... |
733 void FullCodeGenerator::VisitFunctionDeclaration( | 734 void FullCodeGenerator::VisitFunctionDeclaration( |
734 FunctionDeclaration* declaration) { | 735 FunctionDeclaration* declaration) { |
735 VariableProxy* proxy = declaration->proxy(); | 736 VariableProxy* proxy = declaration->proxy(); |
736 Variable* variable = proxy->var(); | 737 Variable* variable = proxy->var(); |
737 switch (variable->location()) { | 738 switch (variable->location()) { |
738 case VariableLocation::UNALLOCATED: { | 739 case VariableLocation::UNALLOCATED: { |
739 globals_->Add(variable->name(), zone()); | 740 globals_->Add(variable->name(), zone()); |
740 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 741 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
741 DCHECK(!slot.IsInvalid()); | 742 DCHECK(!slot.IsInvalid()); |
742 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 743 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 744 |
| 745 // We need the slot where the literals array lives, too. |
| 746 slot = declaration->fun()->LiteralFeedbackSlot(); |
| 747 DCHECK(!slot.IsInvalid()); |
| 748 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 749 |
743 Handle<SharedFunctionInfo> function = | 750 Handle<SharedFunctionInfo> function = |
744 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 751 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
745 // Check for stack-overflow exception. | 752 // Check for stack-overflow exception. |
746 if (function.is_null()) return SetStackOverflow(); | 753 if (function.is_null()) return SetStackOverflow(); |
747 globals_->Add(function, zone()); | 754 globals_->Add(function, zone()); |
748 break; | 755 break; |
749 } | 756 } |
750 | 757 |
751 case VariableLocation::PARAMETER: | 758 case VariableLocation::PARAMETER: |
752 case VariableLocation::LOCAL: { | 759 case VariableLocation::LOCAL: { |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2778 USE(kOSRBranchInstruction); | 2785 USE(kOSRBranchInstruction); |
2779 DCHECK(kOSRBranchInstruction == br_instr); | 2786 DCHECK(kOSRBranchInstruction == br_instr); |
2780 | 2787 |
2781 DCHECK(interrupt_address == | 2788 DCHECK(interrupt_address == |
2782 isolate->builtins()->OnStackReplacement()->entry()); | 2789 isolate->builtins()->OnStackReplacement()->entry()); |
2783 return ON_STACK_REPLACEMENT; | 2790 return ON_STACK_REPLACEMENT; |
2784 } | 2791 } |
2785 } // namespace internal | 2792 } // namespace internal |
2786 } // namespace v8 | 2793 } // namespace v8 |
2787 #endif // V8_TARGET_ARCH_S390 | 2794 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |