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 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "ia32/lithium-codegen-ia32.h" | 9 #include "ia32/lithium-codegen-ia32.h" |
10 #include "ic.h" | 10 #include "ic.h" |
(...skipping 3985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3996 Register value = ToRegister(instr->value()); | 3996 Register value = ToRegister(instr->value()); |
3997 __ test(value, Immediate(kSmiTagMask)); | 3997 __ test(value, Immediate(kSmiTagMask)); |
3998 DeoptimizeIf(zero, instr->environment()); | 3998 DeoptimizeIf(zero, instr->environment()); |
3999 | 3999 |
4000 // We know now that value is not a smi, so we can omit the check below. | 4000 // We know now that value is not a smi, so we can omit the check below. |
4001 check_needed = OMIT_SMI_CHECK; | 4001 check_needed = OMIT_SMI_CHECK; |
4002 } | 4002 } |
4003 } | 4003 } |
4004 } else if (representation.IsDouble()) { | 4004 } else if (representation.IsDouble()) { |
4005 ASSERT(access.IsInobject()); | 4005 ASSERT(access.IsInobject()); |
| 4006 ASSERT(!instr->hydrogen()->has_transition()); |
4006 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4007 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
4007 XMMRegister value = ToDoubleRegister(instr->value()); | 4008 XMMRegister value = ToDoubleRegister(instr->value()); |
4008 __ movsd(FieldOperand(object, offset), value); | 4009 __ movsd(FieldOperand(object, offset), value); |
4009 return; | 4010 return; |
4010 } | 4011 } |
4011 | 4012 |
| 4013 if (instr->hydrogen()->has_transition()) { |
| 4014 Handle<Map> transition = instr->hydrogen()->transition_map(); |
| 4015 AddDeprecationDependency(transition); |
| 4016 if (!instr->hydrogen()->NeedsWriteBarrierForMap()) { |
| 4017 __ mov(FieldOperand(object, HeapObject::kMapOffset), transition); |
| 4018 } else { |
| 4019 Register temp = ToRegister(instr->temp()); |
| 4020 Register temp_map = ToRegister(instr->temp_map()); |
| 4021 __ mov(temp_map, transition); |
| 4022 __ mov(FieldOperand(object, HeapObject::kMapOffset), temp_map); |
| 4023 // Update the write barrier for the map field. |
| 4024 __ RecordWriteField(object, |
| 4025 HeapObject::kMapOffset, |
| 4026 temp_map, |
| 4027 temp, |
| 4028 kSaveFPRegs, |
| 4029 OMIT_REMEMBERED_SET, |
| 4030 OMIT_SMI_CHECK); |
| 4031 } |
| 4032 } |
| 4033 |
4012 // Do the store. | 4034 // Do the store. |
4013 Register write_register = object; | 4035 Register write_register = object; |
4014 if (!access.IsInobject()) { | 4036 if (!access.IsInobject()) { |
4015 write_register = ToRegister(instr->temp()); | 4037 write_register = ToRegister(instr->temp()); |
4016 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 4038 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
4017 } | 4039 } |
4018 | 4040 |
4019 MemOperand operand = FieldOperand(write_register, offset); | 4041 MemOperand operand = FieldOperand(write_register, offset); |
4020 if (instr->value()->IsConstantOperand()) { | 4042 if (instr->value()->IsConstantOperand()) { |
4021 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4043 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
(...skipping 1639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5661 __ bind(deferred->exit()); | 5683 __ bind(deferred->exit()); |
5662 __ bind(&done); | 5684 __ bind(&done); |
5663 } | 5685 } |
5664 | 5686 |
5665 | 5687 |
5666 #undef __ | 5688 #undef __ |
5667 | 5689 |
5668 } } // namespace v8::internal | 5690 } } // namespace v8::internal |
5669 | 5691 |
5670 #endif // V8_TARGET_ARCH_IA32 | 5692 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |