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/stub-cache.h" | 10 #include "src/stub-cache.h" |
(...skipping 3036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3047 return; | 3047 return; |
3048 } | 3048 } |
3049 | 3049 |
3050 if (instr->hydrogen()->representation().IsDouble()) { | 3050 if (instr->hydrogen()->representation().IsDouble()) { |
3051 DwVfpRegister result = ToDoubleRegister(instr->result()); | 3051 DwVfpRegister result = ToDoubleRegister(instr->result()); |
3052 __ vldr(result, FieldMemOperand(object, offset)); | 3052 __ vldr(result, FieldMemOperand(object, offset)); |
3053 return; | 3053 return; |
3054 } | 3054 } |
3055 | 3055 |
3056 Register result = ToRegister(instr->result()); | 3056 Register result = ToRegister(instr->result()); |
| 3057 Register source = object; |
3057 if (!access.IsInobject()) { | 3058 if (!access.IsInobject()) { |
3058 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 3059 if (instr->object_properties()) { |
3059 object = result; | 3060 source = ToRegister(instr->object_properties()); |
| 3061 } else { |
| 3062 __ ldr(result, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 3063 source = result; |
| 3064 } |
3060 } | 3065 } |
3061 MemOperand operand = FieldMemOperand(object, offset); | 3066 MemOperand operand = FieldMemOperand(source, offset); |
3062 __ Load(result, operand, access.representation()); | 3067 __ Load(result, operand, access.representation()); |
3063 } | 3068 } |
3064 | 3069 |
3065 | 3070 |
3066 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { | 3071 void LCodeGen::DoLoadNamedGeneric(LLoadNamedGeneric* instr) { |
3067 ASSERT(ToRegister(instr->context()).is(cp)); | 3072 ASSERT(ToRegister(instr->context()).is(cp)); |
3068 ASSERT(ToRegister(instr->object()).is(r0)); | 3073 ASSERT(ToRegister(instr->object()).is(r0)); |
3069 ASSERT(ToRegister(instr->result()).is(r0)); | 3074 ASSERT(ToRegister(instr->result()).is(r0)); |
3070 | 3075 |
3071 // Name is always in r2. | 3076 // Name is always in r2. |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4103 offset, | 4108 offset, |
4104 value, | 4109 value, |
4105 scratch, | 4110 scratch, |
4106 GetLinkRegisterState(), | 4111 GetLinkRegisterState(), |
4107 kSaveFPRegs, | 4112 kSaveFPRegs, |
4108 EMIT_REMEMBERED_SET, | 4113 EMIT_REMEMBERED_SET, |
4109 instr->hydrogen()->SmiCheckForWriteBarrier(), | 4114 instr->hydrogen()->SmiCheckForWriteBarrier(), |
4110 instr->hydrogen()->PointersToHereCheckForValue()); | 4115 instr->hydrogen()->PointersToHereCheckForValue()); |
4111 } | 4116 } |
4112 } else { | 4117 } else { |
4113 __ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); | 4118 Register destination; |
| 4119 if (instr->object_properties()) { |
| 4120 destination = ToRegister(instr->object_properties()); |
| 4121 } else { |
| 4122 __ ldr(scratch, FieldMemOperand(object, JSObject::kPropertiesOffset)); |
| 4123 destination = scratch; |
| 4124 } |
4114 MemOperand operand = FieldMemOperand(scratch, offset); | 4125 MemOperand operand = FieldMemOperand(scratch, offset); |
4115 __ Store(value, operand, representation); | 4126 __ Store(value, operand, representation); |
4116 if (instr->hydrogen()->NeedsWriteBarrier()) { | 4127 if (instr->hydrogen()->NeedsWriteBarrier()) { |
4117 // Update the write barrier for the properties array. | 4128 // Update the write barrier for the properties array. |
4118 // object is used as a scratch register. | 4129 // object is used as a scratch register. |
4119 __ RecordWriteField(scratch, | 4130 __ RecordWriteField(scratch, |
4120 offset, | 4131 offset, |
4121 value, | 4132 value, |
4122 object, | 4133 object, |
4123 GetLinkRegisterState(), | 4134 GetLinkRegisterState(), |
(...skipping 1705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5829 __ Push(scope_info); | 5840 __ Push(scope_info); |
5830 __ push(ToRegister(instr->function())); | 5841 __ push(ToRegister(instr->function())); |
5831 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); | 5842 CallRuntime(Runtime::kHiddenPushBlockContext, 2, instr); |
5832 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5843 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5833 } | 5844 } |
5834 | 5845 |
5835 | 5846 |
5836 #undef __ | 5847 #undef __ |
5837 | 5848 |
5838 } } // namespace v8::internal | 5849 } } // namespace v8::internal |
OLD | NEW |