| 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 DCHECK(!variable->binding_needs_init()); | 697 DCHECK(!variable->binding_needs_init()); |
| 698 switch (variable->location()) { | 698 switch (variable->location()) { |
| 699 case VariableLocation::UNALLOCATED: { | 699 case VariableLocation::UNALLOCATED: { |
| 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()); | |
| 706 break; | 705 break; |
| 707 } | 706 } |
| 708 case VariableLocation::PARAMETER: | 707 case VariableLocation::PARAMETER: |
| 709 case VariableLocation::LOCAL: | 708 case VariableLocation::LOCAL: |
| 710 case VariableLocation::CONTEXT: | 709 case VariableLocation::CONTEXT: |
| 711 break; | 710 break; |
| 712 | 711 |
| 713 case VariableLocation::LOOKUP: | 712 case VariableLocation::LOOKUP: |
| 714 case VariableLocation::MODULE: | 713 case VariableLocation::MODULE: |
| 715 UNREACHABLE(); | 714 UNREACHABLE(); |
| 716 } | 715 } |
| 717 } | 716 } |
| 718 | 717 |
| 719 void FullCodeGenerator::VisitFunctionDeclaration( | 718 void FullCodeGenerator::VisitFunctionDeclaration( |
| 720 FunctionDeclaration* declaration) { | 719 FunctionDeclaration* declaration) { |
| 721 VariableProxy* proxy = declaration->proxy(); | 720 VariableProxy* proxy = declaration->proxy(); |
| 722 Variable* variable = proxy->var(); | 721 Variable* variable = proxy->var(); |
| 723 switch (variable->location()) { | 722 switch (variable->location()) { |
| 724 case VariableLocation::UNALLOCATED: { | 723 case VariableLocation::UNALLOCATED: { |
| 725 globals_->Add(variable->name(), zone()); | 724 globals_->Add(variable->name(), zone()); |
| 726 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 725 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 727 DCHECK(!slot.IsInvalid()); | 726 DCHECK(!slot.IsInvalid()); |
| 728 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 727 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 729 | |
| 730 // We need the slot where the literals array lives, too. | |
| 731 slot = declaration->fun()->LiteralFeedbackSlot(); | |
| 732 DCHECK(!slot.IsInvalid()); | |
| 733 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | |
| 734 | |
| 735 Handle<SharedFunctionInfo> function = | 728 Handle<SharedFunctionInfo> function = |
| 736 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 729 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
| 737 // Check for stack-overflow exception. | 730 // Check for stack-overflow exception. |
| 738 if (function.is_null()) return SetStackOverflow(); | 731 if (function.is_null()) return SetStackOverflow(); |
| 739 globals_->Add(function, zone()); | 732 globals_->Add(function, zone()); |
| 740 break; | 733 break; |
| 741 } | 734 } |
| 742 | 735 |
| 743 case VariableLocation::PARAMETER: | 736 case VariableLocation::PARAMETER: |
| 744 case VariableLocation::LOCAL: { | 737 case VariableLocation::LOCAL: { |
| (...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2715 USE(kOSRBranchInstruction); | 2708 USE(kOSRBranchInstruction); |
| 2716 DCHECK(kOSRBranchInstruction == br_instr); | 2709 DCHECK(kOSRBranchInstruction == br_instr); |
| 2717 | 2710 |
| 2718 DCHECK(interrupt_address == | 2711 DCHECK(interrupt_address == |
| 2719 isolate->builtins()->OnStackReplacement()->entry()); | 2712 isolate->builtins()->OnStackReplacement()->entry()); |
| 2720 return ON_STACK_REPLACEMENT; | 2713 return ON_STACK_REPLACEMENT; |
| 2721 } | 2714 } |
| 2722 } // namespace internal | 2715 } // namespace internal |
| 2723 } // namespace v8 | 2716 } // namespace v8 |
| 2724 #endif // V8_TARGET_ARCH_S390 | 2717 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |