| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 6218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6229 __ ret(2 * kPointerSize); | 6229 __ ret(2 * kPointerSize); |
| 6230 } | 6230 } |
| 6231 | 6231 |
| 6232 | 6232 |
| 6233 // Takes the input in 3 registers: address_ value_ and object_. A pointer to | 6233 // Takes the input in 3 registers: address_ value_ and object_. A pointer to |
| 6234 // the value has just been written into the object, now this stub makes sure | 6234 // the value has just been written into the object, now this stub makes sure |
| 6235 // we keep the GC informed. The word in the object where the value has been | 6235 // we keep the GC informed. The word in the object where the value has been |
| 6236 // written is in the address register. | 6236 // written is in the address register. |
| 6237 void RecordWriteStub::Generate(MacroAssembler* masm) { | 6237 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 6238 Label skip_non_incremental_part; | 6238 Label skip_non_incremental_part; |
| 6239 |
| 6240 // The first instruction is generated as a label so as to get the offset |
| 6241 // fixed up correctly by the bind(Label*) call. We patch it back and forth |
| 6242 // between a 2-byte compare instruction (a nop in this position) and the real |
| 6243 // branch when we start and stop incremental heap marking. |
| 6239 __ jmp(&skip_non_incremental_part, Label::kNear); | 6244 __ jmp(&skip_non_incremental_part, Label::kNear); |
| 6240 if (!HEAP->incremental_marking()->IsMarking()) { | 6245 if (!masm->isolate()->heap()->incremental_marking()->IsMarking()) { |
| 6241 ASSERT(masm->get_opcode(-2) == kSkipNonIncrementalPartInstruction); | 6246 ASSERT(masm->byte_at(masm->pc_offset() - 2) == |
| 6242 masm->set_opcode(-2, kTwoByteNopInstruction); | 6247 kSkipNonIncrementalPartInstruction); |
| 6248 masm->set_byte_at(masm->pc_offset() - 2, kTwoByteNopInstruction); |
| 6243 } | 6249 } |
| 6244 | 6250 |
| 6245 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { | 6251 if (remembered_set_action_ == EMIT_REMEMBERED_SET) { |
| 6246 __ RememberedSetHelper( | 6252 __ RememberedSetHelper( |
| 6247 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); | 6253 address_, value_, save_fp_regs_mode_, MacroAssembler::kReturnAtEnd); |
| 6248 } else { | 6254 } else { |
| 6249 __ ret(0); | 6255 __ ret(0); |
| 6250 } | 6256 } |
| 6251 | 6257 |
| 6252 __ bind(&skip_non_incremental_part); | 6258 __ bind(&skip_non_incremental_part); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6362 | 6368 |
| 6363 // Fall through when we need to inform the incremental marker. | 6369 // Fall through when we need to inform the incremental marker. |
| 6364 } | 6370 } |
| 6365 | 6371 |
| 6366 | 6372 |
| 6367 #undef __ | 6373 #undef __ |
| 6368 | 6374 |
| 6369 } } // namespace v8::internal | 6375 } } // namespace v8::internal |
| 6370 | 6376 |
| 6371 #endif // V8_TARGET_ARCH_IA32 | 6377 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |