| OLD | NEW |
| 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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
| 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 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 } | 775 } |
| 776 | 776 |
| 777 | 777 |
| 778 void FullCodeGenerator::VisitVariableDeclaration( | 778 void FullCodeGenerator::VisitVariableDeclaration( |
| 779 VariableDeclaration* declaration) { | 779 VariableDeclaration* declaration) { |
| 780 VariableProxy* proxy = declaration->proxy(); | 780 VariableProxy* proxy = declaration->proxy(); |
| 781 Variable* variable = proxy->var(); | 781 Variable* variable = proxy->var(); |
| 782 switch (variable->location()) { | 782 switch (variable->location()) { |
| 783 case VariableLocation::UNALLOCATED: { | 783 case VariableLocation::UNALLOCATED: { |
| 784 DCHECK(!variable->binding_needs_init()); | 784 DCHECK(!variable->binding_needs_init()); |
| 785 globals_->Add(variable->name(), zone()); |
| 785 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 786 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 786 DCHECK(!slot.IsInvalid()); | 787 DCHECK(!slot.IsInvalid()); |
| 787 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 788 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 788 globals_->Add(isolate()->factory()->undefined_value(), zone()); | 789 globals_->Add(isolate()->factory()->undefined_value(), zone()); |
| 789 break; | 790 break; |
| 790 } | 791 } |
| 791 case VariableLocation::PARAMETER: | 792 case VariableLocation::PARAMETER: |
| 792 case VariableLocation::LOCAL: | 793 case VariableLocation::LOCAL: |
| 793 if (variable->binding_needs_init()) { | 794 if (variable->binding_needs_init()) { |
| 794 Comment cmnt(masm_, "[ VariableDeclaration"); | 795 Comment cmnt(masm_, "[ VariableDeclaration"); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 824 } | 825 } |
| 825 } | 826 } |
| 826 | 827 |
| 827 | 828 |
| 828 void FullCodeGenerator::VisitFunctionDeclaration( | 829 void FullCodeGenerator::VisitFunctionDeclaration( |
| 829 FunctionDeclaration* declaration) { | 830 FunctionDeclaration* declaration) { |
| 830 VariableProxy* proxy = declaration->proxy(); | 831 VariableProxy* proxy = declaration->proxy(); |
| 831 Variable* variable = proxy->var(); | 832 Variable* variable = proxy->var(); |
| 832 switch (variable->location()) { | 833 switch (variable->location()) { |
| 833 case VariableLocation::UNALLOCATED: { | 834 case VariableLocation::UNALLOCATED: { |
| 835 globals_->Add(variable->name(), zone()); |
| 834 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 836 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
| 835 DCHECK(!slot.IsInvalid()); | 837 DCHECK(!slot.IsInvalid()); |
| 836 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 838 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
| 837 Handle<SharedFunctionInfo> function = | 839 Handle<SharedFunctionInfo> function = |
| 838 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); | 840 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
| 839 // Check for stack-overflow exception. | 841 // Check for stack-overflow exception. |
| 840 if (function.is_null()) return SetStackOverflow(); | 842 if (function.is_null()) return SetStackOverflow(); |
| 841 globals_->Add(function, zone()); | 843 globals_->Add(function, zone()); |
| 842 break; | 844 break; |
| 843 } | 845 } |
| (...skipping 2795 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3639 reinterpret_cast<uint32_t>( | 3641 reinterpret_cast<uint32_t>( |
| 3640 isolate->builtins()->OnStackReplacement()->entry())); | 3642 isolate->builtins()->OnStackReplacement()->entry())); |
| 3641 return ON_STACK_REPLACEMENT; | 3643 return ON_STACK_REPLACEMENT; |
| 3642 } | 3644 } |
| 3643 | 3645 |
| 3644 | 3646 |
| 3645 } // namespace internal | 3647 } // namespace internal |
| 3646 } // namespace v8 | 3648 } // namespace v8 |
| 3647 | 3649 |
| 3648 #endif // V8_TARGET_ARCH_MIPS | 3650 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |