| 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 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 // must not destroy the current value. | 803 // must not destroy the current value. |
| 804 if (hole_init) { | 804 if (hole_init) { |
| 805 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); | 805 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); |
| 806 } else { | 806 } else { |
| 807 DCHECK(Smi::FromInt(0) == 0); | 807 DCHECK(Smi::FromInt(0) == 0); |
| 808 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. | 808 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. |
| 809 } | 809 } |
| 810 __ Push(a2, a0); | 810 __ Push(a2, a0); |
| 811 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 811 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
| 812 __ CallRuntime(Runtime::kDeclareLookupSlot); | 812 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 813 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
| 813 break; | 814 break; |
| 814 } | 815 } |
| 815 } | 816 } |
| 816 } | 817 } |
| 817 | 818 |
| 818 | 819 |
| 819 void FullCodeGenerator::VisitFunctionDeclaration( | 820 void FullCodeGenerator::VisitFunctionDeclaration( |
| 820 FunctionDeclaration* declaration) { | 821 FunctionDeclaration* declaration) { |
| 821 VariableProxy* proxy = declaration->proxy(); | 822 VariableProxy* proxy = declaration->proxy(); |
| 822 Variable* variable = proxy->var(); | 823 Variable* variable = proxy->var(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 860 } | 861 } |
| 861 | 862 |
| 862 case VariableLocation::LOOKUP: { | 863 case VariableLocation::LOOKUP: { |
| 863 Comment cmnt(masm_, "[ FunctionDeclaration"); | 864 Comment cmnt(masm_, "[ FunctionDeclaration"); |
| 864 __ li(a2, Operand(variable->name())); | 865 __ li(a2, Operand(variable->name())); |
| 865 PushOperand(a2); | 866 PushOperand(a2); |
| 866 // Push initial value for function declaration. | 867 // Push initial value for function declaration. |
| 867 VisitForStackValue(declaration->fun()); | 868 VisitForStackValue(declaration->fun()); |
| 868 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 869 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
| 869 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 870 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
| 871 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
| 870 break; | 872 break; |
| 871 } | 873 } |
| 872 } | 874 } |
| 873 } | 875 } |
| 874 | 876 |
| 875 | 877 |
| 876 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 878 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 877 // Call the runtime to declare the globals. | 879 // Call the runtime to declare the globals. |
| 878 __ li(a1, Operand(pairs)); | 880 __ li(a1, Operand(pairs)); |
| 879 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); | 881 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); |
| (...skipping 3064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3944 reinterpret_cast<uint32_t>( | 3946 reinterpret_cast<uint32_t>( |
| 3945 isolate->builtins()->OnStackReplacement()->entry())); | 3947 isolate->builtins()->OnStackReplacement()->entry())); |
| 3946 return ON_STACK_REPLACEMENT; | 3948 return ON_STACK_REPLACEMENT; |
| 3947 } | 3949 } |
| 3948 | 3950 |
| 3949 | 3951 |
| 3950 } // namespace internal | 3952 } // namespace internal |
| 3951 } // namespace v8 | 3953 } // namespace v8 |
| 3952 | 3954 |
| 3953 #endif // V8_TARGET_ARCH_MIPS | 3955 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |