| 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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 719 } | 719 } |
| 720 } | 720 } |
| 721 | 721 |
| 722 void FullCodeGenerator::VisitVariableDeclaration( | 722 void FullCodeGenerator::VisitVariableDeclaration( |
| 723 VariableDeclaration* declaration) { | 723 VariableDeclaration* declaration) { |
| 724 VariableProxy* proxy = declaration->proxy(); | 724 VariableProxy* proxy = declaration->proxy(); |
| 725 Variable* variable = proxy->var(); | 725 Variable* variable = proxy->var(); |
| 726 switch (variable->location()) { | 726 switch (variable->location()) { |
| 727 case VariableLocation::UNALLOCATED: { | 727 case VariableLocation::UNALLOCATED: { |
| 728 DCHECK(!variable->binding_needs_init()); | 728 DCHECK(!variable->binding_needs_init()); |
| 729 globals_->Add(variable->name(), zone()); |
| 729 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 730 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 730 DCHECK(!slot.IsInvalid()); | 731 DCHECK(!slot.IsInvalid()); |
| 731 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 732 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 732 globals_->Add(isolate()->factory()->undefined_value(), zone()); | 733 globals_->Add(isolate()->factory()->undefined_value(), zone()); |
| 733 break; | 734 break; |
| 734 } | 735 } |
| 735 case VariableLocation::PARAMETER: | 736 case VariableLocation::PARAMETER: |
| 736 case VariableLocation::LOCAL: | 737 case VariableLocation::LOCAL: |
| 737 if (variable->binding_needs_init()) { | 738 if (variable->binding_needs_init()) { |
| 738 Comment cmnt(masm_, "[ VariableDeclaration"); | 739 Comment cmnt(masm_, "[ VariableDeclaration"); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 767 UNREACHABLE(); | 768 UNREACHABLE(); |
| 768 } | 769 } |
| 769 } | 770 } |
| 770 | 771 |
| 771 void FullCodeGenerator::VisitFunctionDeclaration( | 772 void FullCodeGenerator::VisitFunctionDeclaration( |
| 772 FunctionDeclaration* declaration) { | 773 FunctionDeclaration* declaration) { |
| 773 VariableProxy* proxy = declaration->proxy(); | 774 VariableProxy* proxy = declaration->proxy(); |
| 774 Variable* variable = proxy->var(); | 775 Variable* variable = proxy->var(); |
| 775 switch (variable->location()) { | 776 switch (variable->location()) { |
| 776 case VariableLocation::UNALLOCATED: { | 777 case VariableLocation::UNALLOCATED: { |
| 778 globals_->Add(variable->name(), zone()); |
| 777 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 779 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 778 DCHECK(!slot.IsInvalid()); | 780 DCHECK(!slot.IsInvalid()); |
| 779 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 781 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 780 Handle<SharedFunctionInfo> function = | 782 Handle<SharedFunctionInfo> function = |
| 781 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 783 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
| 782 // Check for stack-overflow exception. | 784 // Check for stack-overflow exception. |
| 783 if (function.is_null()) return SetStackOverflow(); | 785 if (function.is_null()) return SetStackOverflow(); |
| 784 globals_->Add(function, zone()); | 786 globals_->Add(function, zone()); |
| 785 break; | 787 break; |
| 786 } | 788 } |
| (...skipping 2760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3547 DCHECK(kOSRBranchInstruction == br_instr); | 3549 DCHECK(kOSRBranchInstruction == br_instr); |
| 3548 | 3550 |
| 3549 DCHECK(interrupt_address == | 3551 DCHECK(interrupt_address == |
| 3550 isolate->builtins()->OnStackReplacement()->entry()); | 3552 isolate->builtins()->OnStackReplacement()->entry()); |
| 3551 return ON_STACK_REPLACEMENT; | 3553 return ON_STACK_REPLACEMENT; |
| 3552 } | 3554 } |
| 3553 | 3555 |
| 3554 } // namespace internal | 3556 } // namespace internal |
| 3555 } // namespace v8 | 3557 } // namespace v8 |
| 3556 #endif // V8_TARGET_ARCH_S390 | 3558 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |