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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "arm/lithium-codegen-arm.h" | 7 #include "arm/lithium-codegen-arm.h" |
8 #include "arm/lithium-gap-resolver-arm.h" | 8 #include "arm/lithium-gap-resolver-arm.h" |
9 #include "code-stubs.h" | 9 #include "code-stubs.h" |
10 #include "stub-cache.h" | 10 #include "stub-cache.h" |
(...skipping 4079 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4090 Register value = ToRegister(instr->value()); | 4090 Register value = ToRegister(instr->value()); |
4091 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4091 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
4092 __ SmiTst(value); | 4092 __ SmiTst(value); |
4093 DeoptimizeIf(eq, instr->environment()); | 4093 DeoptimizeIf(eq, instr->environment()); |
4094 | 4094 |
4095 // We know now that value is not a smi, so we can omit the check below. | 4095 // We know now that value is not a smi, so we can omit the check below. |
4096 check_needed = OMIT_SMI_CHECK; | 4096 check_needed = OMIT_SMI_CHECK; |
4097 } | 4097 } |
4098 } else if (representation.IsDouble()) { | 4098 } else if (representation.IsDouble()) { |
4099 ASSERT(access.IsInobject()); | 4099 ASSERT(access.IsInobject()); |
4100 ASSERT(!instr->hydrogen()->has_transition()); | |
4101 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4100 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
4102 DwVfpRegister value = ToDoubleRegister(instr->value()); | 4101 DwVfpRegister value = ToDoubleRegister(instr->value()); |
4103 __ vstr(value, FieldMemOperand(object, offset)); | 4102 __ vstr(value, FieldMemOperand(object, offset)); |
4104 return; | 4103 return; |
4105 } | 4104 } |
4106 | 4105 |
4107 if (instr->hydrogen()->has_transition()) { | |
4108 Handle<Map> transition = instr->hydrogen()->transition_map(); | |
4109 AddDeprecationDependency(transition); | |
4110 __ mov(scratch, Operand(transition)); | |
4111 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | |
4112 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { | |
4113 Register temp = ToRegister(instr->temp()); | |
4114 // Update the write barrier for the map field. | |
4115 __ RecordWriteField(object, | |
4116 HeapObject::kMapOffset, | |
4117 scratch, | |
4118 temp, | |
4119 GetLinkRegisterState(), | |
4120 kSaveFPRegs, | |
4121 OMIT_REMEMBERED_SET, | |
4122 OMIT_SMI_CHECK); | |
4123 } | |
4124 } | |
4125 | |
4126 // Do the store. | 4106 // Do the store. |
4127 Register value = ToRegister(instr->value()); | 4107 Register value = ToRegister(instr->value()); |
4128 if (access.IsInobject()) { | 4108 if (access.IsInobject()) { |
4129 MemOperand operand = FieldMemOperand(object, offset); | 4109 MemOperand operand = FieldMemOperand(object, offset); |
4130 __ Store(value, operand, representation); | 4110 __ Store(value, operand, representation); |
4131 if (instr->hydrogen()->NeedsWriteBarrier()) { | 4111 if (instr->hydrogen()->NeedsWriteBarrier()) { |
4132 // Update the write barrier for the object for in-object properties. | 4112 // Update the write barrier for the object for in-object properties. |
4133 __ RecordWriteField(object, | 4113 __ RecordWriteField(object, |
4134 offset, | 4114 offset, |
4135 value, | 4115 value, |
(...skipping 1720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5856 __ ldr(result, FieldMemOperand(scratch, | 5836 __ ldr(result, FieldMemOperand(scratch, |
5857 FixedArray::kHeaderSize - kPointerSize)); | 5837 FixedArray::kHeaderSize - kPointerSize)); |
5858 __ bind(deferred->exit()); | 5838 __ bind(deferred->exit()); |
5859 __ bind(&done); | 5839 __ bind(&done); |
5860 } | 5840 } |
5861 | 5841 |
5862 | 5842 |
5863 #undef __ | 5843 #undef __ |
5864 | 5844 |
5865 } } // namespace v8::internal | 5845 } } // namespace v8::internal |
OLD | NEW |