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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/arm/lithium-codegen-arm.h" | 7 #include "src/arm/lithium-codegen-arm.h" |
8 #include "src/arm/lithium-gap-resolver-arm.h" | 8 #include "src/arm/lithium-gap-resolver-arm.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/hydrogen-osr.h" | 10 #include "src/hydrogen-osr.h" |
(...skipping 2932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2943 if (instr->hydrogen()->RequiresHoleCheck()) { | 2943 if (instr->hydrogen()->RequiresHoleCheck()) { |
2944 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2944 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
2945 __ cmp(result, ip); | 2945 __ cmp(result, ip); |
2946 DeoptimizeIf(eq, instr->environment()); | 2946 DeoptimizeIf(eq, instr->environment()); |
2947 } | 2947 } |
2948 } | 2948 } |
2949 | 2949 |
2950 | 2950 |
2951 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2951 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2952 ASSERT(ToRegister(instr->context()).is(cp)); | 2952 ASSERT(ToRegister(instr->context()).is(cp)); |
2953 ASSERT(ToRegister(instr->global_object()).is(r0)); | 2953 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); |
2954 ASSERT(ToRegister(instr->result()).is(r0)); | 2954 ASSERT(ToRegister(instr->result()).is(r0)); |
2955 | 2955 |
2956 __ mov(r2, Operand(instr->name())); | 2956 __ mov(LoadIC::NameRegister(), Operand(instr->name())); |
2957 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2957 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
2958 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2958 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
2959 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2959 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2960 } | 2960 } |
2961 | 2961 |
2962 | 2962 |
2963 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2963 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
2964 Register value = ToRegister(instr->value()); | 2964 Register value = ToRegister(instr->value()); |
2965 Register cell = scratch0(); | 2965 Register cell = scratch0(); |
2966 | 2966 |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3062 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 3062 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
3063 object = result; | 3063 object = result; |
3064 } | 3064 } |
3065 MemOperand operand = FieldMemOperand(object, offset); | 3065 MemOperand operand = FieldMemOperand(object, offset); |
3066 __ Load(result, operand, access.representation()); | 3066 __ Load(result, operand, access.representation()); |
3067 } | 3067 } |
3068 | 3068 |
3069 | 3069 |
3070 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3070 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3071 ASSERT(ToRegister(instr->context()).is(cp)); | 3071 ASSERT(ToRegister(instr->context()).is(cp)); |
3072 ASSERT(ToRegister(instr->object()).is(r0)); | 3072 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); |
3073 ASSERT(ToRegister(instr->result()).is(r0)); | 3073 ASSERT(ToRegister(instr->result()).is(r0)); |
3074 | 3074 |
3075 // Name is always in r2. | 3075 // Name is always in r2. |
3076 __ mov(r2, Operand(instr->name())); | 3076 __ mov(LoadIC::NameRegister(), Operand(instr->name())); |
3077 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3077 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
3078 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3078 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
3079 } | 3079 } |
3080 | 3080 |
3081 | 3081 |
3082 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3082 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
3083 Register scratch = scratch0(); | 3083 Register scratch = scratch0(); |
3084 Register function = ToRegister(instr->function()); | 3084 Register function = ToRegister(instr->function()); |
3085 Register result = ToRegister(instr->result()); | 3085 Register result = ToRegister(instr->result()); |
3086 | 3086 |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3368 } else { | 3368 } else { |
3369 ASSERT_EQ(-1, shift_size); | 3369 ASSERT_EQ(-1, shift_size); |
3370 __ add(scratch0(), base, Operand(key, ASR, 1)); | 3370 __ add(scratch0(), base, Operand(key, ASR, 1)); |
3371 return MemOperand(scratch0(), base_offset); | 3371 return MemOperand(scratch0(), base_offset); |
3372 } | 3372 } |
3373 } | 3373 } |
3374 | 3374 |
3375 | 3375 |
3376 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3376 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
3377 ASSERT(ToRegister(instr->context()).is(cp)); | 3377 ASSERT(ToRegister(instr->context()).is(cp)); |
3378 ASSERT(ToRegister(instr->object()).is(r1)); | 3378 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister())); |
3379 ASSERT(ToRegister(instr->key()).is(r0)); | 3379 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister())); |
3380 | 3380 |
3381 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3381 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
3382 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3382 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
3383 } | 3383 } |
3384 | 3384 |
3385 | 3385 |
3386 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3386 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
3387 Register scratch = scratch0(); | 3387 Register scratch = scratch0(); |
3388 Register result = ToRegister(instr->result()); | 3388 Register result = ToRegister(instr->result()); |
3389 | 3389 |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5825 __ Push(scope_info); | 5825 __ Push(scope_info); |
5826 __ push(ToRegister(instr->function())); | 5826 __ push(ToRegister(instr->function())); |
5827 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5827 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
5828 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5828 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5829 } | 5829 } |
5830 | 5830 |
5831 | 5831 |
5832 #undef __ | 5832 #undef __ |
5833 | 5833 |
5834 } } // namespace v8::internal | 5834 } } // namespace v8::internal |
OLD | NEW |