| 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 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2962 if (instr->hydrogen()->RequiresHoleCheck()) { | 2962 if (instr->hydrogen()->RequiresHoleCheck()) { |
| 2963 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); | 2963 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); |
| 2964 __ cmp(result, ip); | 2964 __ cmp(result, ip); |
| 2965 DeoptimizeIf(eq, instr->environment()); | 2965 DeoptimizeIf(eq, instr->environment()); |
| 2966 } | 2966 } |
| 2967 } | 2967 } |
| 2968 | 2968 |
| 2969 | 2969 |
| 2970 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2970 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
| 2971 ASSERT(ToRegister(instr->context()).is(cp)); | 2971 ASSERT(ToRegister(instr->context()).is(cp)); |
| 2972 ASSERT(ToRegister(instr->global_object()).is(LoadIC::ReceiverRegister())); | 2972 ASSERT(ToRegister(instr->global_object()).is(r0)); |
| 2973 ASSERT(ToRegister(instr->result()).is(r0)); | 2973 ASSERT(ToRegister(instr->result()).is(r0)); |
| 2974 | 2974 |
| 2975 __ mov(LoadIC::NameRegister(), Operand(instr->name())); | 2975 __ mov(r2, Operand(instr->name())); |
| 2976 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; | 2976 ContextualMode mode = instr->for_typeof() ? NOT_CONTEXTUAL : CONTEXTUAL; |
| 2977 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); | 2977 Handle<Code> ic = LoadIC::initialize_stub(isolate(), mode); |
| 2978 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2978 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
| 2979 } | 2979 } |
| 2980 | 2980 |
| 2981 | 2981 |
| 2982 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { | 2982 void LCodeGen::DoStoreGlobalCell(LStoreGlobalCell* instr) { |
| 2983 Register value = ToRegister(instr->value()); | 2983 Register value = ToRegister(instr->value()); |
| 2984 Register cell = scratch0(); | 2984 Register cell = scratch0(); |
| 2985 | 2985 |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3081 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 3081 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 3082 object = result; | 3082 object = result; |
| 3083 } | 3083 } |
| 3084 MemOperand operand = FieldMemOperand(object, offset); | 3084 MemOperand operand = FieldMemOperand(object, offset); |
| 3085 __ Load(result, operand, access.representation()); | 3085 __ Load(result, operand, access.representation()); |
| 3086 } | 3086 } |
| 3087 | 3087 |
| 3088 | 3088 |
| 3089 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3089 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
| 3090 ASSERT(ToRegister(instr->context()).is(cp)); | 3090 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3091 ASSERT(ToRegister(instr->object()).is(LoadIC::ReceiverRegister())); | 3091 ASSERT(ToRegister(instr->object()).is(r0)); |
| 3092 ASSERT(ToRegister(instr->result()).is(r0)); | 3092 ASSERT(ToRegister(instr->result()).is(r0)); |
| 3093 | 3093 |
| 3094 // Name is always in r2. | 3094 // Name is always in r2. |
| 3095 __ mov(LoadIC::NameRegister(), Operand(instr->name())); | 3095 __ mov(r2, Operand(instr->name())); |
| 3096 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); | 3096 Handle<Code> ic = LoadIC::initialize_stub(isolate(), NOT_CONTEXTUAL); |
| 3097 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3097 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3098 } | 3098 } |
| 3099 | 3099 |
| 3100 | 3100 |
| 3101 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 3101 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
| 3102 Register scratch = scratch0(); | 3102 Register scratch = scratch0(); |
| 3103 Register function = ToRegister(instr->function()); | 3103 Register function = ToRegister(instr->function()); |
| 3104 Register result = ToRegister(instr->result()); | 3104 Register result = ToRegister(instr->result()); |
| 3105 | 3105 |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3387 } else { | 3387 } else { |
| 3388 ASSERT_EQ(-1, shift_size); | 3388 ASSERT_EQ(-1, shift_size); |
| 3389 __ add(scratch0(), base, Operand(key, ASR, 1)); | 3389 __ add(scratch0(), base, Operand(key, ASR, 1)); |
| 3390 return MemOperand(scratch0(), base_offset); | 3390 return MemOperand(scratch0(), base_offset); |
| 3391 } | 3391 } |
| 3392 } | 3392 } |
| 3393 | 3393 |
| 3394 | 3394 |
| 3395 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { | 3395 void LCodeGen::DoLoadKeyedGeneric(LLoadKeyedGeneric* instr) { |
| 3396 ASSERT(ToRegister(instr->context()).is(cp)); | 3396 ASSERT(ToRegister(instr->context()).is(cp)); |
| 3397 ASSERT(ToRegister(instr->object()).is(KeyedLoadIC::ReceiverRegister())); | 3397 ASSERT(ToRegister(instr->object()).is(r1)); |
| 3398 ASSERT(ToRegister(instr->key()).is(KeyedLoadIC::NameRegister())); | 3398 ASSERT(ToRegister(instr->key()).is(r0)); |
| 3399 | 3399 |
| 3400 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); | 3400 Handle<Code> ic = isolate()->builtins()->KeyedLoadIC_Initialize(); |
| 3401 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 3401 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
| 3402 } | 3402 } |
| 3403 | 3403 |
| 3404 | 3404 |
| 3405 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { | 3405 void LCodeGen::DoArgumentsElements(LArgumentsElements* instr) { |
| 3406 Register scratch = scratch0(); | 3406 Register scratch = scratch0(); |
| 3407 Register result = ToRegister(instr->result()); | 3407 Register result = ToRegister(instr->result()); |
| 3408 | 3408 |
| (...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5844 __ Push(scope_info); | 5844 __ Push(scope_info); |
| 5845 __ push(ToRegister(instr->function())); | 5845 __ push(ToRegister(instr->function())); |
| 5846 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5846 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5847 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5847 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5848 } | 5848 } |
| 5849 | 5849 |
| 5850 | 5850 |
| 5851 #undef __ | 5851 #undef __ |
| 5852 | 5852 |
| 5853 } } // namespace v8::internal | 5853 } } // namespace v8::internal |
| OLD | NEW |