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