| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 | 142 |
| 143 // Set the remembered set bit for [object+offset]. | 143 // Set the remembered set bit for [object+offset]. |
| 144 // object is the object being stored into, value is the object being stored. | 144 // object is the object being stored into, value is the object being stored. |
| 145 // If offset is zero, then the scratch register contains the array index into | 145 // If offset is zero, then the scratch register contains the array index into |
| 146 // the elements array represented as a Smi. | 146 // the elements array represented as a Smi. |
| 147 // All registers are clobbered by the operation. | 147 // All registers are clobbered by the operation. |
| 148 void MacroAssembler::RecordWrite(Register object, int offset, | 148 void MacroAssembler::RecordWrite(Register object, int offset, |
| 149 Register value, Register scratch) { | 149 Register value, Register scratch) { |
| 150 // The compiled code assumes that record write doesn't change the |
| 151 // context register, so we check that none of the clobbered |
| 152 // registers are esi. |
| 153 ASSERT(!object.is(esi) && !value.is(esi) && !scratch.is(esi)); |
| 154 |
| 150 // First, check if a remembered set write is even needed. The tests below | 155 // First, check if a remembered set write is even needed. The tests below |
| 151 // catch stores of Smis and stores into young gen (which does not have space | 156 // catch stores of Smis and stores into young gen (which does not have space |
| 152 // for the remembered set bits. | 157 // for the remembered set bits. |
| 153 Label done; | 158 Label done; |
| 154 | 159 |
| 155 // Skip barrier if writing a smi. | 160 // Skip barrier if writing a smi. |
| 156 ASSERT_EQ(0, kSmiTag); | 161 ASSERT_EQ(0, kSmiTag); |
| 157 test(value, Immediate(kSmiTagMask)); | 162 test(value, Immediate(kSmiTagMask)); |
| 158 j(zero, &done); | 163 j(zero, &done); |
| 159 | 164 |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1578 // Indicate that code has changed. | 1583 // Indicate that code has changed. |
| 1579 CPU::FlushICache(address_, size_); | 1584 CPU::FlushICache(address_, size_); |
| 1580 | 1585 |
| 1581 // Check that the code was patched as expected. | 1586 // Check that the code was patched as expected. |
| 1582 ASSERT(masm_.pc_ == address_ + size_); | 1587 ASSERT(masm_.pc_ == address_ + size_); |
| 1583 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); | 1588 ASSERT(masm_.reloc_info_writer.pos() == address_ + size_ + Assembler::kGap); |
| 1584 } | 1589 } |
| 1585 | 1590 |
| 1586 | 1591 |
| 1587 } } // namespace v8::internal | 1592 } } // namespace v8::internal |
| OLD | NEW |