| 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 | 796 |
| 797 case VariableLocation::LOOKUP: { | 797 case VariableLocation::LOOKUP: { |
| 798 Comment cmnt(masm_, "[ VariableDeclaration"); | 798 Comment cmnt(masm_, "[ VariableDeclaration"); |
| 799 __ li(a2, Operand(variable->name())); | 799 __ li(a2, Operand(variable->name())); |
| 800 // Declaration nodes are always introduced in one of four modes. | 800 // Declaration nodes are always introduced in one of four modes. |
| 801 DCHECK(IsDeclaredVariableMode(mode)); | 801 DCHECK(IsDeclaredVariableMode(mode)); |
| 802 DCHECK(!hole_init); | 802 DCHECK(!hole_init); |
| 803 DCHECK(Smi::FromInt(0) == 0); | 803 DCHECK(Smi::FromInt(0) == 0); |
| 804 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. | 804 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. |
| 805 __ Push(a2, a0); | 805 __ Push(a2, a0); |
| 806 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | |
| 807 __ CallRuntime(Runtime::kDeclareLookupSlot); | 806 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 808 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 807 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
| 809 break; | 808 break; |
| 810 } | 809 } |
| 811 } | 810 } |
| 812 } | 811 } |
| 813 | 812 |
| 814 | 813 |
| 815 void FullCodeGenerator::VisitFunctionDeclaration( | 814 void FullCodeGenerator::VisitFunctionDeclaration( |
| 816 FunctionDeclaration* declaration) { | 815 FunctionDeclaration* declaration) { |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 854 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 853 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
| 855 break; | 854 break; |
| 856 } | 855 } |
| 857 | 856 |
| 858 case VariableLocation::LOOKUP: { | 857 case VariableLocation::LOOKUP: { |
| 859 Comment cmnt(masm_, "[ FunctionDeclaration"); | 858 Comment cmnt(masm_, "[ FunctionDeclaration"); |
| 860 __ li(a2, Operand(variable->name())); | 859 __ li(a2, Operand(variable->name())); |
| 861 PushOperand(a2); | 860 PushOperand(a2); |
| 862 // Push initial value for function declaration. | 861 // Push initial value for function declaration. |
| 863 VisitForStackValue(declaration->fun()); | 862 VisitForStackValue(declaration->fun()); |
| 864 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | |
| 865 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 863 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
| 866 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 864 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
| 867 break; | 865 break; |
| 868 } | 866 } |
| 869 } | 867 } |
| 870 } | 868 } |
| 871 | 869 |
| 872 | 870 |
| 873 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 871 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 874 // Call the runtime to declare the globals. | 872 // Call the runtime to declare the globals. |
| (...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3827 reinterpret_cast<uint64_t>( | 3825 reinterpret_cast<uint64_t>( |
| 3828 isolate->builtins()->OnStackReplacement()->entry())); | 3826 isolate->builtins()->OnStackReplacement()->entry())); |
| 3829 return ON_STACK_REPLACEMENT; | 3827 return ON_STACK_REPLACEMENT; |
| 3830 } | 3828 } |
| 3831 | 3829 |
| 3832 | 3830 |
| 3833 } // namespace internal | 3831 } // namespace internal |
| 3834 } // namespace v8 | 3832 } // namespace v8 |
| 3835 | 3833 |
| 3836 #endif // V8_TARGET_ARCH_MIPS64 | 3834 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |