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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 Condition cond) { | 198 Condition cond) { |
199 ldr(destination, MemOperand(r10, index << kPointerSizeLog2), cond); | 199 ldr(destination, MemOperand(r10, index << kPointerSizeLog2), cond); |
200 } | 200 } |
201 | 201 |
202 | 202 |
203 // Will clobber 4 registers: object, offset, scratch, ip. The | 203 // Will clobber 4 registers: object, offset, scratch, ip. The |
204 // register 'object' contains a heap object pointer. The heap object | 204 // register 'object' contains a heap object pointer. The heap object |
205 // tag is shifted away. | 205 // tag is shifted away. |
206 void MacroAssembler::RecordWrite(Register object, Register offset, | 206 void MacroAssembler::RecordWrite(Register object, Register offset, |
207 Register scratch) { | 207 Register scratch) { |
| 208 // The compiled code assumes that record write doesn't change the |
| 209 // context register, so we check that none of the clobbered |
| 210 // registers are cp. |
| 211 ASSERT(!object.is(cp) && !offset.is(cp) && !scratch.is(cp)); |
| 212 |
208 // This is how much we shift the remembered set bit offset to get the | 213 // This is how much we shift the remembered set bit offset to get the |
209 // offset of the word in the remembered set. We divide by kBitsPerInt (32, | 214 // offset of the word in the remembered set. We divide by kBitsPerInt (32, |
210 // shift right 5) and then multiply by kIntSize (4, shift left 2). | 215 // shift right 5) and then multiply by kIntSize (4, shift left 2). |
211 const int kRSetWordShift = 3; | 216 const int kRSetWordShift = 3; |
212 | 217 |
213 Label fast, done; | 218 Label fast, done; |
214 | 219 |
215 // First, test that the object is not in the new space. We cannot set | 220 // First, test that the object is not in the new space. We cannot set |
216 // remembered set bits in the new space. | 221 // remembered set bits in the new space. |
217 // object: heap object pointer (with tag) | 222 // object: heap object pointer (with tag) |
(...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 } | 1299 } |
1295 | 1300 |
1296 | 1301 |
1297 void CodePatcher::Emit(Address addr) { | 1302 void CodePatcher::Emit(Address addr) { |
1298 masm()->emit(reinterpret_cast<Instr>(addr)); | 1303 masm()->emit(reinterpret_cast<Instr>(addr)); |
1299 } | 1304 } |
1300 #endif // ENABLE_DEBUGGER_SUPPORT | 1305 #endif // ENABLE_DEBUGGER_SUPPORT |
1301 | 1306 |
1302 | 1307 |
1303 } } // namespace v8::internal | 1308 } } // namespace v8::internal |
OLD | NEW |