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 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2671 Register result = ToRegister(instr->result()); | 2671 Register result = ToRegister(instr->result()); |
2672 if (!access.IsInobject()) { | 2672 if (!access.IsInobject()) { |
2673 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 2673 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
2674 object = result; | 2674 object = result; |
2675 } | 2675 } |
2676 MemOperand operand = FieldMemOperand(object, offset); | 2676 MemOperand operand = FieldMemOperand(object, offset); |
2677 __ Load(result, operand, access.representation()); | 2677 __ Load(result, operand, access.representation()); |
2678 } | 2678 } |
2679 | 2679 |
2680 | 2680 |
2681 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | |
2682 DCHECK(ToRegister(instr->context()).is(cp)); | |
2683 DCHECK(ToRegister(instr->object()).is(LoadDescriptor::ReceiverRegister())); | |
2684 DCHECK(ToRegister(instr->result()).is(r0)); | |
2685 | |
2686 // Name is always in r2. | |
2687 __ mov(LoadDescriptor::NameRegister(), Operand(instr->name())); | |
2688 EmitVectorLoadICRegisters<LLoadNamedGeneric>(instr); | |
2689 Handle<Code> ic = CodeFactory::LoadICInOptimizedCode(isolate()).code(); | |
2690 CallCode(ic, RelocInfo::CODE_TARGET, instr, NEVER_INLINE_TARGET_ADDRESS); | |
2691 } | |
2692 | |
2693 | |
2694 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { | 2681 void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
2695 Register scratch = scratch0(); | 2682 Register scratch = scratch0(); |
2696 Register function = ToRegister(instr->function()); | 2683 Register function = ToRegister(instr->function()); |
2697 Register result = ToRegister(instr->result()); | 2684 Register result = ToRegister(instr->result()); |
2698 | 2685 |
2699 // Get the prototype or initial map from the function. | 2686 // Get the prototype or initial map from the function. |
2700 __ ldr(result, | 2687 __ ldr(result, |
2701 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); | 2688 FieldMemOperand(function, JSFunction::kPrototypeOrInitialMapOffset)); |
2702 | 2689 |
2703 // Check that the function has a prototype or an initial map. | 2690 // Check that the function has a prototype or an initial map. |
(...skipping 2763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5467 __ ldr(result, FieldMemOperand(scratch, | 5454 __ ldr(result, FieldMemOperand(scratch, |
5468 FixedArray::kHeaderSize - kPointerSize)); | 5455 FixedArray::kHeaderSize - kPointerSize)); |
5469 __ bind(deferred->exit()); | 5456 __ bind(deferred->exit()); |
5470 __ bind(&done); | 5457 __ bind(&done); |
5471 } | 5458 } |
5472 | 5459 |
5473 #undef __ | 5460 #undef __ |
5474 | 5461 |
5475 } // namespace internal | 5462 } // namespace internal |
5476 } // namespace v8 | 5463 } // namespace v8 |
OLD | NEW |