OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 3943 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3954 | 3954 |
3955 Register write_register = object; | 3955 Register write_register = object; |
3956 if (!instr->is_in_object()) { | 3956 if (!instr->is_in_object()) { |
3957 write_register = ToRegister(instr->temp()); | 3957 write_register = ToRegister(instr->temp()); |
3958 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 3958 __ movq(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
3959 } | 3959 } |
3960 | 3960 |
3961 if (instr->value()->IsConstantOperand()) { | 3961 if (instr->value()->IsConstantOperand()) { |
3962 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 3962 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
3963 if (IsInteger32Constant(operand_value)) { | 3963 if (IsInteger32Constant(operand_value)) { |
3964 int const_value = ToInteger32(operand_value); | 3964 // In lithium register preparation, we made sure that the constant integer |
3965 __ movq(FieldOperand(write_register, offset), Immediate(const_value)); | 3965 // operand fits into smi range. |
| 3966 Smi* smi_value = Smi::FromInt(ToInteger32(operand_value)); |
| 3967 __ Move(FieldOperand(write_register, offset), smi_value); |
| 3968 } else if (operand_value->IsRegister()) { |
| 3969 __ movq(FieldOperand(write_register, offset), |
| 3970 ToRegister(operand_value)); |
3966 } else { | 3971 } else { |
3967 if (operand_value->IsRegister()) { | 3972 Handle<Object> handle_value = ToHandle(operand_value); |
3968 __ movq(FieldOperand(write_register, offset), | 3973 __ Move(FieldOperand(write_register, offset), handle_value); |
3969 ToRegister(operand_value)); | |
3970 } else { | |
3971 Handle<Object> handle_value = ToHandle(operand_value); | |
3972 __ Move(FieldOperand(write_register, offset), handle_value); | |
3973 } | |
3974 } | 3974 } |
3975 } else { | 3975 } else { |
3976 __ movq(FieldOperand(write_register, offset), ToRegister(instr->value())); | 3976 __ movq(FieldOperand(write_register, offset), ToRegister(instr->value())); |
3977 } | 3977 } |
3978 | 3978 |
3979 if (instr->hydrogen()->NeedsWriteBarrier()) { | 3979 if (instr->hydrogen()->NeedsWriteBarrier()) { |
3980 Register value = ToRegister(instr->value()); | 3980 Register value = ToRegister(instr->value()); |
3981 Register temp = instr->is_in_object() ? ToRegister(instr->temp()) : object; | 3981 Register temp = instr->is_in_object() ? ToRegister(instr->temp()) : object; |
3982 // Update the write barrier for the object for in-object properties. | 3982 // Update the write barrier for the object for in-object properties. |
3983 __ RecordWriteField(write_register, | 3983 __ RecordWriteField(write_register, |
(...skipping 1702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5686 FixedArray::kHeaderSize - kPointerSize)); | 5686 FixedArray::kHeaderSize - kPointerSize)); |
5687 __ bind(&done); | 5687 __ bind(&done); |
5688 } | 5688 } |
5689 | 5689 |
5690 | 5690 |
5691 #undef __ | 5691 #undef __ |
5692 | 5692 |
5693 } } // namespace v8::internal | 5693 } } // namespace v8::internal |
5694 | 5694 |
5695 #endif // V8_TARGET_ARCH_X64 | 5695 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |