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

Unified Diff: src/ia32/codegen-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/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 7494)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -7831,9 +7831,18 @@
// Possible optimization: do a check that both values are Smis
// (or them and test against Smi mask.)
+ // Since we are swapping two objects, the incremental marker is not disturbed,
+ // so we don't call the stub that handles this. TODO(gc): Optimize by
+ // checking the scan_on_scavenge flag, probably by calling the stub.
__ mov(tmp2.reg(), tmp1.reg());
- __ RecordWriteHelper(tmp2.reg(), index1.reg(), object.reg(), kDontSaveFPRegs);
- __ RecordWriteHelper(tmp1.reg(), index2.reg(), object.reg(), kDontSaveFPRegs);
+ __ RememberedSetHelper(tmp2.reg(),
+ index1.reg(),
+ object.reg(),
+ kDontSaveFPRegs);
+ __ RememberedSetHelper(tmp1.reg(),
+ index2.reg(),
+ object.reg(),
+ kDontSaveFPRegs);
__ bind(&done);
deferred->BindExit();
@@ -9786,10 +9795,10 @@
__ InNewSpace(receiver.reg(), value.reg(), equal, &skip_write_barrier);
int delta_to_record_write = masm_->SizeOfCodeGeneratedSince(&patch_site);
__ lea(scratch.reg(), Operand(receiver.reg(), offset));
- __ RecordWriteHelper(receiver.reg(),
- scratch.reg(),
- value.reg(),
- kDontSaveFPRegs);
+ __ RememberedSetHelper(receiver.reg(),
Vyacheslav Egorov (Chromium) 2011/04/06 11:46:40 this place should have an incremental write barrie
Erik Corry 2011/04/06 12:31:28 This whole file is on death row. Comment added.
+ scratch.reg(),
+ value.reg(),
+ kDontSaveFPRegs);
if (FLAG_debug_code) {
__ mov(receiver.reg(), Immediate(BitCast<int32_t>(kZapValue)));
__ mov(value.reg(), Immediate(BitCast<int32_t>(kZapValue)));

Powered by Google App Engine
This is Rietveld 408576698