| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 4271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4282 __ mov(operand, Immediate(ToInteger32(operand_value))); | 4282 __ mov(operand, Immediate(ToInteger32(operand_value))); |
| 4283 } else { | 4283 } else { |
| 4284 Register value = ToRegister(instr->value()); | 4284 Register value = ToRegister(instr->value()); |
| 4285 __ Store(value, operand, representation); | 4285 __ Store(value, operand, representation); |
| 4286 } | 4286 } |
| 4287 return; | 4287 return; |
| 4288 } | 4288 } |
| 4289 | 4289 |
| 4290 Register object = ToRegister(instr->object()); | 4290 Register object = ToRegister(instr->object()); |
| 4291 Handle<Map> transition = instr->transition(); | 4291 Handle<Map> transition = instr->transition(); |
| 4292 SmiCheck check_needed = |
| 4293 instr->hydrogen()->value()->IsHeapObject() |
| 4294 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
| 4292 | 4295 |
| 4293 if (FLAG_track_fields && representation.IsSmi()) { | 4296 if (FLAG_track_fields && representation.IsSmi()) { |
| 4294 if (instr->value()->IsConstantOperand()) { | 4297 if (instr->value()->IsConstantOperand()) { |
| 4295 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4298 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4296 if (!IsSmi(operand_value)) { | 4299 if (!IsSmi(operand_value)) { |
| 4297 DeoptimizeIf(no_condition, instr->environment()); | 4300 DeoptimizeIf(no_condition, instr->environment()); |
| 4298 } | 4301 } |
| 4299 } | 4302 } |
| 4300 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { | 4303 } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) { |
| 4301 if (instr->value()->IsConstantOperand()) { | 4304 if (instr->value()->IsConstantOperand()) { |
| 4302 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4305 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4303 if (IsInteger32(operand_value)) { | 4306 if (IsInteger32(operand_value)) { |
| 4304 DeoptimizeIf(no_condition, instr->environment()); | 4307 DeoptimizeIf(no_condition, instr->environment()); |
| 4305 } | 4308 } |
| 4306 } else { | 4309 } else { |
| 4307 if (!instr->hydrogen()->value()->type().IsHeapObject()) { | 4310 if (!instr->hydrogen()->value()->type().IsHeapObject()) { |
| 4308 Register value = ToRegister(instr->value()); | 4311 Register value = ToRegister(instr->value()); |
| 4309 __ test(value, Immediate(kSmiTagMask)); | 4312 __ test(value, Immediate(kSmiTagMask)); |
| 4310 DeoptimizeIf(zero, instr->environment()); | 4313 DeoptimizeIf(zero, instr->environment()); |
| 4314 |
| 4315 // We know that value is a smi now, so we can omit the check below. |
| 4316 check_needed = OMIT_SMI_CHECK; |
| 4311 } | 4317 } |
| 4312 } | 4318 } |
| 4313 } else if (representation.IsDouble()) { | 4319 } else if (representation.IsDouble()) { |
| 4314 ASSERT(transition.is_null()); | 4320 ASSERT(transition.is_null()); |
| 4315 ASSERT(access.IsInobject()); | 4321 ASSERT(access.IsInobject()); |
| 4316 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); | 4322 ASSERT(!instr->hydrogen()->NeedsWriteBarrier()); |
| 4317 if (CpuFeatures::IsSupported(SSE2)) { | 4323 if (CpuFeatures::IsSupported(SSE2)) { |
| 4318 CpuFeatureScope scope(masm(), SSE2); | 4324 CpuFeatureScope scope(masm(), SSE2); |
| 4319 XMMRegister value = ToDoubleRegister(instr->value()); | 4325 XMMRegister value = ToDoubleRegister(instr->value()); |
| 4320 __ movsd(FieldOperand(object, offset), value); | 4326 __ movsd(FieldOperand(object, offset), value); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 4338 HeapObject::kMapOffset, | 4344 HeapObject::kMapOffset, |
| 4339 temp_map, | 4345 temp_map, |
| 4340 temp, | 4346 temp, |
| 4341 GetSaveFPRegsMode(), | 4347 GetSaveFPRegsMode(), |
| 4342 OMIT_REMEMBERED_SET, | 4348 OMIT_REMEMBERED_SET, |
| 4343 OMIT_SMI_CHECK); | 4349 OMIT_SMI_CHECK); |
| 4344 } | 4350 } |
| 4345 } | 4351 } |
| 4346 | 4352 |
| 4347 // Do the store. | 4353 // Do the store. |
| 4348 SmiCheck check_needed = | |
| 4349 instr->hydrogen()->value()->IsHeapObject() | |
| 4350 ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | |
| 4351 | |
| 4352 Register write_register = object; | 4354 Register write_register = object; |
| 4353 if (!access.IsInobject()) { | 4355 if (!access.IsInobject()) { |
| 4354 write_register = ToRegister(instr->temp()); | 4356 write_register = ToRegister(instr->temp()); |
| 4355 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); | 4357 __ mov(write_register, FieldOperand(object, JSObject::kPropertiesOffset)); |
| 4356 } | 4358 } |
| 4357 | 4359 |
| 4358 MemOperand operand = FieldOperand(write_register, offset); | 4360 MemOperand operand = FieldOperand(write_register, offset); |
| 4359 if (instr->value()->IsConstantOperand()) { | 4361 if (instr->value()->IsConstantOperand()) { |
| 4360 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); | 4362 LConstantOperand* operand_value = LConstantOperand::cast(instr->value()); |
| 4361 if (operand_value->IsRegister()) { | 4363 if (operand_value->IsRegister()) { |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6266 FixedArray::kHeaderSize - kPointerSize)); | 6268 FixedArray::kHeaderSize - kPointerSize)); |
| 6267 __ bind(&done); | 6269 __ bind(&done); |
| 6268 } | 6270 } |
| 6269 | 6271 |
| 6270 | 6272 |
| 6271 #undef __ | 6273 #undef __ |
| 6272 | 6274 |
| 6273 } } // namespace v8::internal | 6275 } } // namespace v8::internal |
| 6274 | 6276 |
| 6275 #endif // V8_TARGET_ARCH_IA32 | 6277 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |