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_ARM | 5 #if V8_TARGET_ARCH_ARM |
6 | 6 |
7 #include "src/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 3909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3920 __ JumpIfSmi(r0, if_false); | 3920 __ JumpIfSmi(r0, if_false); |
3921 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); | 3921 __ ldr(r0, FieldMemOperand(r0, HeapObject::kMapOffset)); |
3922 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); | 3922 __ ldrb(r1, FieldMemOperand(r0, Map::kBitFieldOffset)); |
3923 __ tst(r1, Operand(1 << Map::kIsUndetectable)); | 3923 __ tst(r1, Operand(1 << Map::kIsUndetectable)); |
3924 Split(ne, if_true, if_false, fall_through); | 3924 Split(ne, if_true, if_false, fall_through); |
3925 } | 3925 } |
3926 context()->Plug(if_true, if_false); | 3926 context()->Plug(if_true, if_false); |
3927 } | 3927 } |
3928 | 3928 |
3929 | 3929 |
3930 void FullCodeGenerator::VisitThisFunction(ThisFunction* expr) { | |
3931 __ ldr(r0, MemOperand(fp, JavaScriptFrameConstants::kFunctionOffset)); | |
3932 context()->Plug(r0); | |
3933 } | |
3934 | |
3935 | |
3936 Register FullCodeGenerator::result_register() { | 3930 Register FullCodeGenerator::result_register() { |
3937 return r0; | 3931 return r0; |
3938 } | 3932 } |
3939 | 3933 |
3940 | 3934 |
3941 Register FullCodeGenerator::context_register() { | 3935 Register FullCodeGenerator::context_register() { |
3942 return cp; | 3936 return cp; |
3943 } | 3937 } |
3944 | 3938 |
| 3939 void FullCodeGenerator::LoadFromFrameField(int frame_offset, Register value) { |
| 3940 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
| 3941 __ ldr(value, MemOperand(fp, frame_offset)); |
| 3942 } |
3945 | 3943 |
3946 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { | 3944 void FullCodeGenerator::StoreToFrameField(int frame_offset, Register value) { |
3947 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); | 3945 DCHECK_EQ(POINTER_SIZE_ALIGN(frame_offset), frame_offset); |
3948 __ str(value, MemOperand(fp, frame_offset)); | 3946 __ str(value, MemOperand(fp, frame_offset)); |
3949 } | 3947 } |
3950 | 3948 |
3951 | 3949 |
3952 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { | 3950 void FullCodeGenerator::LoadContextField(Register dst, int context_index) { |
3953 __ ldr(dst, ContextMemOperand(cp, context_index)); | 3951 __ ldr(dst, ContextMemOperand(cp, context_index)); |
3954 } | 3952 } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4175 DCHECK(interrupt_address == | 4173 DCHECK(interrupt_address == |
4176 isolate->builtins()->OnStackReplacement()->entry()); | 4174 isolate->builtins()->OnStackReplacement()->entry()); |
4177 return ON_STACK_REPLACEMENT; | 4175 return ON_STACK_REPLACEMENT; |
4178 } | 4176 } |
4179 | 4177 |
4180 | 4178 |
4181 } // namespace internal | 4179 } // namespace internal |
4182 } // namespace v8 | 4180 } // namespace v8 |
4183 | 4181 |
4184 #endif // V8_TARGET_ARCH_ARM | 4182 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |