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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 void FullCodeGenerator::VisitFunctionDeclaration( | 779 void FullCodeGenerator::VisitFunctionDeclaration( |
780 FunctionDeclaration* declaration) { | 780 FunctionDeclaration* declaration) { |
781 VariableProxy* proxy = declaration->proxy(); | 781 VariableProxy* proxy = declaration->proxy(); |
782 Variable* variable = proxy->var(); | 782 Variable* variable = proxy->var(); |
783 switch (variable->location()) { | 783 switch (variable->location()) { |
784 case VariableLocation::UNALLOCATED: { | 784 case VariableLocation::UNALLOCATED: { |
785 globals_->Add(variable->name(), zone()); | 785 globals_->Add(variable->name(), zone()); |
786 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 786 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
787 DCHECK(!slot.IsInvalid()); | 787 DCHECK(!slot.IsInvalid()); |
788 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 788 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
789 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( | 789 Handle<SharedFunctionInfo> function = |
790 declaration->fun(), script(), info_, compilation_mode_); | 790 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
791 // Check for stack-overflow exception. | 791 // Check for stack-overflow exception. |
792 if (function.is_null()) return SetStackOverflow(); | 792 if (function.is_null()) return SetStackOverflow(); |
793 globals_->Add(function, zone()); | 793 globals_->Add(function, zone()); |
794 break; | 794 break; |
795 } | 795 } |
796 | 796 |
797 case VariableLocation::PARAMETER: | 797 case VariableLocation::PARAMETER: |
798 case VariableLocation::LOCAL: { | 798 case VariableLocation::LOCAL: { |
799 Comment cmnt(masm_, "[ FunctionDeclaration"); | 799 Comment cmnt(masm_, "[ FunctionDeclaration"); |
800 VisitForAccumulatorValue(declaration->fun()); | 800 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2792 reinterpret_cast<uint32_t>( | 2792 reinterpret_cast<uint32_t>( |
2793 isolate->builtins()->OnStackReplacement()->entry())); | 2793 isolate->builtins()->OnStackReplacement()->entry())); |
2794 return ON_STACK_REPLACEMENT; | 2794 return ON_STACK_REPLACEMENT; |
2795 } | 2795 } |
2796 | 2796 |
2797 | 2797 |
2798 } // namespace internal | 2798 } // namespace internal |
2799 } // namespace v8 | 2799 } // namespace v8 |
2800 | 2800 |
2801 #endif // V8_TARGET_ARCH_MIPS | 2801 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |