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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 void FullCodeGenerator::VisitFunctionDeclaration( | 794 void FullCodeGenerator::VisitFunctionDeclaration( |
795 FunctionDeclaration* declaration) { | 795 FunctionDeclaration* declaration) { |
796 VariableProxy* proxy = declaration->proxy(); | 796 VariableProxy* proxy = declaration->proxy(); |
797 Variable* variable = proxy->var(); | 797 Variable* variable = proxy->var(); |
798 switch (variable->location()) { | 798 switch (variable->location()) { |
799 case VariableLocation::UNALLOCATED: { | 799 case VariableLocation::UNALLOCATED: { |
800 globals_->Add(variable->name(), zone()); | 800 globals_->Add(variable->name(), zone()); |
801 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); | 801 FeedbackVectorSlot slot = proxy->VariableFeedbackSlot(); |
802 DCHECK(!slot.IsInvalid()); | 802 DCHECK(!slot.IsInvalid()); |
803 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); | 803 globals_->Add(handle(Smi::FromInt(slot.ToInt()), isolate()), zone()); |
804 Handle<SharedFunctionInfo> function = Compiler::GetSharedFunctionInfo( | 804 Handle<SharedFunctionInfo> function = |
805 declaration->fun(), script(), info_, compilation_mode_); | 805 Compiler::GetSharedFunctionInfo(declaration->fun(), script(), info_); |
806 // Check for stack-overflow exception. | 806 // Check for stack-overflow exception. |
807 if (function.is_null()) return SetStackOverflow(); | 807 if (function.is_null()) return SetStackOverflow(); |
808 globals_->Add(function, zone()); | 808 globals_->Add(function, zone()); |
809 break; | 809 break; |
810 } | 810 } |
811 | 811 |
812 case VariableLocation::PARAMETER: | 812 case VariableLocation::PARAMETER: |
813 case VariableLocation::LOCAL: { | 813 case VariableLocation::LOCAL: { |
814 Comment cmnt(masm_, "[ FunctionDeclaration"); | 814 Comment cmnt(masm_, "[ FunctionDeclaration"); |
815 VisitForAccumulatorValue(declaration->fun()); | 815 VisitForAccumulatorValue(declaration->fun()); |
(...skipping 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2883 reinterpret_cast<uint32_t>( | 2883 reinterpret_cast<uint32_t>( |
2884 isolate->builtins()->OnStackReplacement()->entry())); | 2884 isolate->builtins()->OnStackReplacement()->entry())); |
2885 return ON_STACK_REPLACEMENT; | 2885 return ON_STACK_REPLACEMENT; |
2886 } | 2886 } |
2887 | 2887 |
2888 | 2888 |
2889 } // namespace internal | 2889 } // namespace internal |
2890 } // namespace v8 | 2890 } // namespace v8 |
2891 | 2891 |
2892 #endif // V8_TARGET_ARCH_MIPS | 2892 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |