| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "x64/lithium-codegen-x64.h" | 9 #include "x64/lithium-codegen-x64.h" |
| 10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
| (...skipping 4003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4014 Register value = ToRegister(instr->value()); | 4014 Register value = ToRegister(instr->value()); |
| 4015 Condition cc = masm()->CheckSmi(value); | 4015 Condition cc = masm()->CheckSmi(value); |
| 4016 DeoptimizeIf(cc, instr->environment()); | 4016 DeoptimizeIf(cc, instr->environment()); |
| 4017 | 4017 |
| 4018 // We know now that value is not a smi, so we can omit the check below. | 4018 // We know now that value is not a smi, so we can omit the check below. |
| 4019 check_needed = OMIT_SMI_CHECK; | 4019 check_needed = OMIT_SMI_CHECK; |
| 4020 } | 4020 } |
| 4021 } | 4021 } |
| 4022 } else if (representation.IsDouble()) { | 4022 } else if (representation.IsDouble()) { |
| 4023 ASSERT(access.IsInobject()); | 4023 ASSERT(access.IsInobject()); |
| 4024 ASSERT(!hinstr->has_transition()); | |
| 4025 ASSERT(!hinstr->NeedsWriteBarrier()); | 4024 ASSERT(!hinstr->NeedsWriteBarrier()); |
| 4026 XMMRegister value = ToDoubleRegister(instr->value()); | 4025 XMMRegister value = ToDoubleRegister(instr->value()); |
| 4027 __ movsd(FieldOperand(object, offset), value); | 4026 __ movsd(FieldOperand(object, offset), value); |
| 4028 return; | 4027 return; |
| 4029 } | 4028 } |
| 4030 | 4029 |
| 4031 if (hinstr->has_transition()) { | |
| 4032 Handle<Map> transition = hinstr->transition_map(); | |
| 4033 AddDeprecationDependency(transition); | |
| 4034 if (!hinstr->NeedsWriteBarrierForMap()) { | |
| 4035 __ Move(FieldOperand(object, HeapObject::kMapOffset), transition); | |
| 4036 } else { | |
| 4037 Register temp = ToRegister(instr->temp()); | |
| 4038 __ Move(kScratchRegister, transition); | |
| 4039 __ movp(FieldOperand(object, HeapObject::kMapOffset), kScratchRegister); | |
| 4040 // Update the write barrier for the map field. | |
| 4041 __ RecordWriteField(object, | |
| 4042 HeapObject::kMapOffset, | |
| 4043 kScratchRegister, | |
| 4044 temp, | |
| 4045 kSaveFPRegs, | |
| 4046 OMIT_REMEMBERED_SET, | |
| 4047 OMIT_SMI_CHECK); | |
| 4048 } | |
| 4049 } | |
| 4050 | |
| 4051 // Do the store. | 4030 // Do the store. |
| 4052 Register write_register = object; | 4031 Register write_register = object; |
| 4053 if (!access.IsInobject()) { | 4032 if (!access.IsInobject()) { |
| 4054 write_register = ToRegister(instr->temp()); | 4033 write_register = ToRegister(instr->temp()); |
| 4055 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 4034 __ movp(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
| 4056 } | 4035 } |
| 4057 | 4036 |
| 4058 if (representation.IsSmi() && SmiValuesAre32Bits() && | 4037 if (representation.IsSmi() && SmiValuesAre32Bits() && |
| 4059 hinstr->value()->representation().IsInteger32()) { | 4038 hinstr->value()->representation().IsInteger32()) { |
| 4060 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); | 4039 ASSERT(hinstr->store_mode() == STORE_TO_INITIALIZED_ENTRY); |
| (...skipping 1659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 __ bind(deferred->exit()); | 5699 __ bind(deferred->exit()); |
| 5721 __ bind(&done); | 5700 __ bind(&done); |
| 5722 } | 5701 } |
| 5723 | 5702 |
| 5724 | 5703 |
| 5725 #undef __ | 5704 #undef __ |
| 5726 | 5705 |
| 5727 } } // namespace v8::internal | 5706 } } // namespace v8::internal |
| 5728 | 5707 |
| 5729 #endif // V8_TARGET_ARCH_X64 | 5708 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |