Chromium Code Reviews| 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 6446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6457 __ pop(ecx); | 6457 __ pop(ecx); |
| 6458 __ pop(eax); | 6458 __ pop(eax); |
| 6459 __ pop(edx); | 6459 __ pop(edx); |
| 6460 __ push(ecx); | 6460 __ push(ecx); |
| 6461 | 6461 |
| 6462 // Do a tail call to the rewritten stub. | 6462 // Do a tail call to the rewritten stub. |
| 6463 __ jmp(Operand(edi)); | 6463 __ jmp(Operand(edi)); |
| 6464 } | 6464 } |
| 6465 | 6465 |
| 6466 | 6466 |
| 6467 void IncrementalMarkingRecordWriteStub::Generate(MacroAssembler* masm) { | 6467 void RecordWriteStub::Generate(MacroAssembler* masm) { |
| 6468 if (IncrementalMarking::IsStopped()) { | 6468 NearLabel skip_incremental_part; |
| 6469 __ ret(0); | 6469 __ jmp(&skip_incremental_part); |
| 6470 } else { | 6470 if (!IncrementalMarking::IsStopped()) { |
| 6471 __ nop(); | 6471 ASSERT(masm->get_opcode(-2) == kSkipIncrementalPartInstruction); |
| 6472 masm->set_opcode(-2, kTwoByteNopInstruction); | |
| 6472 } | 6473 } |
| 6473 | 6474 |
| 6474 __ IncrementalMarkingRecordWriteHelper(object_, | 6475 // If we are also emitting the remembered set code in this stub then we have |
| 6475 value_, | 6476 // the object we are writing into in the 'address' register. We insert a |
|
Vyacheslav Egorov (Chromium)
2011/04/06 11:46:40
we have the object in the object register.
I guess
Erik Corry
2011/04/06 12:31:28
Done.
| |
| 6476 scratch_, | 6477 // primitive test here to ensure that this is the case. Otherwise the |
| 6477 object_mode_, | 6478 // 'address' register is merely a scratch register. |
| 6478 value_mode_, | 6479 if (FLAG_debug_code && emit_remembered_set_ == EMIT_REMEMBERED_SET) { |
| 6479 scratch_mode_); | 6480 NearLabel ok; |
| 6481 __ cmp(address_, Operand(object_)); | |
| 6482 __ j(above_equal, &ok); | |
| 6483 __ int3(); | |
| 6484 __ bind(&ok); | |
| 6485 } | |
| 6486 | |
| 6487 __ IncrementalMarkingRecordWriteHelper(object_, value_, address_); | |
| 6488 | |
| 6489 __ bind(&skip_incremental_part); | |
| 6490 | |
| 6491 if (emit_remembered_set_ == EMIT_REMEMBERED_SET) { | |
| 6492 Register scratch = value_; | |
| 6493 NearLabel done; | |
| 6494 __ InNewSpace(object_, scratch, equal, &done); | |
| 6495 __ RememberedSetHelper(object_, address_, scratch, save_fp_regs_mode_); | |
| 6496 __ bind(&done); | |
| 6497 } | |
| 6480 __ ret(0); | 6498 __ ret(0); |
| 6481 } | 6499 } |
| 6482 | 6500 |
| 6483 | 6501 |
| 6484 #undef __ | 6502 #undef __ |
| 6485 | 6503 |
| 6486 } } // namespace v8::internal | 6504 } } // namespace v8::internal |
| 6487 | 6505 |
| 6488 #endif // V8_TARGET_ARCH_IA32 | 6506 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |