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/crankshaft/arm/lithium-codegen-arm.h" | 5 #include "src/crankshaft/arm/lithium-codegen-arm.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.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/crankshaft/arm/lithium-gap-resolver-arm.h" | 10 #include "src/crankshaft/arm/lithium-gap-resolver-arm.h" |
(...skipping 2611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2622 | 2622 |
2623 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { | 2623 void LCodeGen::DoLoadGlobalGeneric(LLoadGlobalGeneric* instr) { |
2624 DCHECK(ToRegister(instr->context()).is(cp)); | 2624 DCHECK(ToRegister(instr->context()).is(cp)); |
2625 DCHECK(ToRegister(instr->global_object()) | 2625 DCHECK(ToRegister(instr->global_object()) |
2626 .is(LoadDescriptor::ReceiverRegister())); | 2626 .is(LoadDescriptor::ReceiverRegister())); |
2627 DCHECK(ToRegister(instr->result()).is(r0)); | 2627 DCHECK(ToRegister(instr->result()).is(r0)); |
2628 | 2628 |
2629 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2629 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
2630 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); | 2630 EmitVectorLoadICRegisters<LLoadGlobalGeneric>(instr); |
2631 Handle<Code> ic = | 2631 Handle<Code> ic = |
2632 CodeFactory::LoadICInOptimizedCode(isolate(), instr->typeof_mode()) | 2632 CodeFactory::LoadGlobalICInOptimizedCode(isolate(), instr->typeof_mode()) |
2633 .code(); | 2633 .code(); |
2634 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 2634 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
2635 } | 2635 } |
2636 | 2636 |
2637 | 2637 |
2638 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { | 2638 void LCodeGen::DoLoadContextSlot(LLoadContextSlot* instr) { |
2639 Register context = ToRegister(instr->context()); | 2639 Register context = ToRegister(instr->context()); |
2640 Register result = ToRegister(instr->result()); | 2640 Register result = ToRegister(instr->result()); |
2641 __ ldr(result, ContextMemOperand(context, instr->slot_index())); | 2641 __ ldr(result, ContextMemOperand(context, instr->slot_index())); |
2642 if (instr->hydrogen()->RequiresHoleCheck()) { | 2642 if (instr->hydrogen()->RequiresHoleCheck()) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2718 | 2718 |
2719 | 2719 |
2720 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 2720 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
2721 DCHECK(ToRegister(instr->context()).is(cp)); | 2721 DCHECK(ToRegister(instr->context()).is(cp)); |
2722 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | 2722 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); |
2723 DCHECK(ToRegister(instr->result()).is(r0)); | 2723 DCHECK(ToRegister(instr->result()).is(r0)); |
2724 | 2724 |
2725 // Name is always in r2. | 2725 // Name is always in r2. |
2726 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | 2726 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); |
2727 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | 2727 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); |
2728 Handle<Code> ic = | 2728 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); |
2729 CodeFactory::LoadICInOptimizedCode(isolate(), NOT_INSIDE_TYPEOF).code(); | |
2730 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | 2729 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); |
2731 } | 2730 } |
2732 | 2731 |
2733 | 2732 |
2734 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2733 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2735 Register scratch = scratch0(); | 2734 Register scratch = scratch0(); |
2736 Register function = ToRegister(instr->function()); | 2735 Register function = ToRegister(instr->function()); |
2737 Register result = ToRegister(instr->result()); | 2736 Register result = ToRegister(instr->result()); |
2738 | 2737 |
2739 // Get the prototype or initial map from the function. | 2738 // Get the prototype or initial map from the function. |
(...skipping 2812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5552 __ ldr(result, FieldMemOperand(scratch, | 5551 __ ldr(result, FieldMemOperand(scratch, |
5553 FixedArray::kHeaderSize - kPointerSize)); | 5552 FixedArray::kHeaderSize - kPointerSize)); |
5554 __ bind(deferred->exit()); | 5553 __ bind(deferred->exit()); |
5555 __ bind(&done); | 5554 __ bind(&done); |
5556 } | 5555 } |
5557 | 5556 |
5558 #undef __ | 5557 #undef __ |
5559 | 5558 |
5560 } // namespace internal | 5559 } // namespace internal |
5561 } // namespace v8 | 5560 } // namespace v8 |
OLD | NEW |