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 3657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3668 Register object = ToRegister(instr->object()); | 3668 Register object = ToRegister(instr->object()); |
3669 Register value = ToRegister(instr->value()); | 3669 Register value = ToRegister(instr->value()); |
3670 Register scratch = scratch0(); | 3670 Register scratch = scratch0(); |
3671 int offset = instr->offset(); | 3671 int offset = instr->offset(); |
3672 | 3672 |
3673 ASSERT(!object.is(value)); | 3673 ASSERT(!object.is(value)); |
3674 | 3674 |
3675 if (!instr->transition().is_null()) { | 3675 if (!instr->transition().is_null()) { |
3676 __ mov(scratch, Operand(instr->transition())); | 3676 __ mov(scratch, Operand(instr->transition())); |
3677 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 3677 __ str(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 3678 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { |
| 3679 Register temp = ToRegister(instr->TempAt(0)); |
| 3680 // Update the write barrier for the map field. |
| 3681 __ RecordWriteField(object, |
| 3682 HeapObject::kMapOffset, |
| 3683 scratch, |
| 3684 temp, |
| 3685 kLRHasBeenSaved, |
| 3686 kSaveFPRegs, |
| 3687 OMIT_REMEMBERED_SET, |
| 3688 OMIT_SMI_CHECK); |
| 3689 } |
3678 } | 3690 } |
3679 | 3691 |
3680 // Do the store. | 3692 // Do the store. |
3681 HType type = instr->hydrogen()->value()->type(); | 3693 HType type = instr->hydrogen()->value()->type(); |
3682 SmiCheck check_needed = | 3694 SmiCheck check_needed = |
3683 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 3695 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
3684 if (instr->is_in_object()) { | 3696 if (instr->is_in_object()) { |
3685 __ str(value, FieldMemOperand(object, offset)); | 3697 __ str(value, FieldMemOperand(object, offset)); |
3686 if (instr->hydrogen()->NeedsWriteBarrier()) { | 3698 if (instr->hydrogen()->NeedsWriteBarrier()) { |
3687 // Update the write barrier for the object for in-object properties. | 3699 // Update the write barrier for the object for in-object properties. |
(...skipping 1657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5345 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); | 5357 __ sub(scratch, result, Operand(index, LSL, kPointerSizeLog2 - kSmiTagSize)); |
5346 __ ldr(result, FieldMemOperand(scratch, | 5358 __ ldr(result, FieldMemOperand(scratch, |
5347 FixedArray::kHeaderSize - kPointerSize)); | 5359 FixedArray::kHeaderSize - kPointerSize)); |
5348 __ bind(&done); | 5360 __ bind(&done); |
5349 } | 5361 } |
5350 | 5362 |
5351 | 5363 |
5352 #undef __ | 5364 #undef __ |
5353 | 5365 |
5354 } } // namespace v8::internal | 5366 } } // namespace v8::internal |
OLD | NEW |