Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(488)

Unified Diff: src/ia32/code-stubs-ia32.cc

Issue 6794052: Combine the incremental-marking write barrier and the remembered-set... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/code-stubs-ia32.cc
===================================================================
--- src/ia32/code-stubs-ia32.cc (revision 7494)
+++ src/ia32/code-stubs-ia32.cc (working copy)
@@ -6464,19 +6464,37 @@
}
-void IncrementalMarkingRecordWriteStub::Generate(MacroAssembler* masm) {
- if (IncrementalMarking::IsStopped()) {
- __ ret(0);
- } else {
- __ nop();
+void RecordWriteStub::Generate(MacroAssembler* masm) {
+ NearLabel skip_incremental_part;
+ __ jmp(&skip_incremental_part);
+ if (!IncrementalMarking::IsStopped()) {
+ ASSERT(masm->get_opcode(-2) == kSkipIncrementalPartInstruction);
+ masm->set_opcode(-2, kTwoByteNopInstruction);
}
- __ IncrementalMarkingRecordWriteHelper(object_,
- value_,
- scratch_,
- object_mode_,
- value_mode_,
- scratch_mode_);
+ // If we are also emitting the remembered set code in this stub then we have
+ // 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.
+ // primitive test here to ensure that this is the case. Otherwise the
+ // 'address' register is merely a scratch register.
+ if (FLAG_debug_code && emit_remembered_set_ == EMIT_REMEMBERED_SET) {
+ NearLabel ok;
+ __ cmp(address_, Operand(object_));
+ __ j(above_equal, &ok);
+ __ int3();
+ __ bind(&ok);
+ }
+
+ __ IncrementalMarkingRecordWriteHelper(object_, value_, address_);
+
+ __ bind(&skip_incremental_part);
+
+ if (emit_remembered_set_ == EMIT_REMEMBERED_SET) {
+ Register scratch = value_;
+ NearLabel done;
+ __ InNewSpace(object_, scratch, equal, &done);
+ __ RememberedSetHelper(object_, address_, scratch, save_fp_regs_mode_);
+ __ bind(&done);
+ }
__ ret(0);
}
« no previous file with comments | « src/ia32/code-stubs-ia32.h ('k') | src/ia32/codegen-ia32.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698