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 3437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3448 Register object = ToRegister(instr->object()); | 3448 Register object = ToRegister(instr->object()); |
3449 Register value = ToRegister(instr->value()); | 3449 Register value = ToRegister(instr->value()); |
3450 Register scratch = scratch0(); | 3450 Register scratch = scratch0(); |
3451 int offset = instr->offset(); | 3451 int offset = instr->offset(); |
3452 | 3452 |
3453 ASSERT(!object.is(value)); | 3453 ASSERT(!object.is(value)); |
3454 | 3454 |
3455 if (!instr->transition().is_null()) { | 3455 if (!instr->transition().is_null()) { |
3456 __ li(scratch, Operand(instr->transition())); | 3456 __ li(scratch, Operand(instr->transition())); |
3457 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); | 3457 __ sw(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); |
| 3458 if (instr->hydrogen()->NeedsWriteBarrierForMap()) { |
| 3459 Register temp = ToRegister(instr->TempAt(0)); |
| 3460 // Update the write barrier for the map field. |
| 3461 __ RecordWriteField(object, |
| 3462 HeapObject::kMapOffset, |
| 3463 scratch, |
| 3464 temp, |
| 3465 kRAHasBeenSaved, |
| 3466 kSaveFPRegs, |
| 3467 OMIT_REMEMBERED_SET, |
| 3468 OMIT_SMI_CHECK); |
| 3469 } |
3458 } | 3470 } |
3459 | 3471 |
3460 // Do the store. | 3472 // Do the store. |
3461 HType type = instr->hydrogen()->value()->type(); | 3473 HType type = instr->hydrogen()->value()->type(); |
3462 SmiCheck check_needed = | 3474 SmiCheck check_needed = |
3463 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; | 3475 type.IsHeapObject() ? OMIT_SMI_CHECK : INLINE_SMI_CHECK; |
3464 if (instr->is_in_object()) { | 3476 if (instr->is_in_object()) { |
3465 __ sw(value, FieldMemOperand(object, offset)); | 3477 __ sw(value, FieldMemOperand(object, offset)); |
3466 if (instr->hydrogen()->NeedsWriteBarrier()) { | 3478 if (instr->hydrogen()->NeedsWriteBarrier()) { |
3467 // Update the write barrier for the object for in-object properties. | 3479 // Update the write barrier for the object for in-object properties. |
(...skipping 1695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5163 __ Subu(scratch, result, scratch); | 5175 __ Subu(scratch, result, scratch); |
5164 __ lw(result, FieldMemOperand(scratch, | 5176 __ lw(result, FieldMemOperand(scratch, |
5165 FixedArray::kHeaderSize - kPointerSize)); | 5177 FixedArray::kHeaderSize - kPointerSize)); |
5166 __ bind(&done); | 5178 __ bind(&done); |
5167 } | 5179 } |
5168 | 5180 |
5169 | 5181 |
5170 #undef __ | 5182 #undef __ |
5171 | 5183 |
5172 } } // namespace v8::internal | 5184 } } // namespace v8::internal |
OLD | NEW |