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

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, 8 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 7503)
+++ 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,12 @@
__ 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);
+ // This code does not work with the incremental marker! Luckily this file
+ // is going away soon.
+ __ RememberedSetHelper(receiver.reg(),
+ 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)));
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698