| 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 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3931 __ JumpIfSmi(v0, if_false); | 3931 __ JumpIfSmi(v0, if_false); |
| 3932 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); | 3932 __ lw(v0, FieldMemOperand(v0, HeapObject::kMapOffset)); |
| 3933 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); | 3933 __ lbu(a1, FieldMemOperand(v0, Map::kBitFieldOffset)); |
| 3934 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); | 3934 __ And(a1, a1, Operand(1 << Map::kIsUndetectable)); |
| 3935 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); | 3935 Split(ne, a1, Operand(zero_reg), if_true, if_false, fall_through); |
| 3936 } | 3936 } |
| 3937 context()->Plug(if_true, if_false); | 3937 context()->Plug(if_true, if_false); |
| 3938 } | 3938 } |
| 3939 | 3939 |
| 3940 | 3940 |
| 3941 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | |
| 3942 __ lw(v0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
| 3943 context()->Plug(v0); | |
| 3944 } | |
| 3945 | |
| 3946 | |
| 3947 Register FullCodeGenerator::result_register() { | 3941 Register FullCodeGenerator::result_register() { |
| 3948 return v0; | 3942 return v0; |
| 3949 } | 3943 } |
| 3950 | 3944 |
| 3951 | 3945 |
| 3952 Register FullCodeGenerator::context_register() { | 3946 Register FullCodeGenerator::context_register() { |
| 3953 return cp; | 3947 return cp; |
| 3954 } | 3948 } |
| 3955 | 3949 |
| 3950 void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { |
| 3951 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3952 __ lw(value, MemOperand(fp, frame_offset)); |
| 3953 } |
| 3956 | 3954 |
| 3957 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 3955 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
| 3958 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); | 3956 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3959 __ sw(value, MemOperand(fp, frame_offset)); | 3957 __ sw(value, MemOperand(fp, frame_offset)); |
| 3960 } | 3958 } |
| 3961 | 3959 |
| 3962 | 3960 |
| 3963 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 3961 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
| 3964 __ lw(dst, ContextMemOperand(cp, context_index)); | 3962 __ lw(dst, ContextMemOperand(cp, context_index)); |
| 3965 } | 3963 } |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4121 reinterpret_cast<uint32_t>( | 4119 reinterpret_cast<uint32_t>( |
| 4122 isolate->builtins()->OnStackReplacement()->entry())); | 4120 isolate->builtins()->OnStackReplacement()->entry())); |
| 4123 return ON_STACK_REPLACEMENT; | 4121 return ON_STACK_REPLACEMENT; |
| 4124 } | 4122 } |
| 4125 | 4123 |
| 4126 | 4124 |
| 4127 } // namespace internal | 4125 } // namespace internal |
| 4128 } // namespace v8 | 4126 } // namespace v8 |
| 4129 | 4127 |
| 4130 #endif // V8_TARGET_ARCH_MIPS | 4128 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |