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

Unified Diff: src/ia32/full-codegen-ia32.cc

Issue 6092007: Write buffer based write barrier for IA32 and Crankshaft. Currently... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 years, 12 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/codegen-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/full-codegen-ia32.cc
===================================================================
--- src/ia32/full-codegen-ia32.cc (revision 6183)
+++ src/ia32/full-codegen-ia32.cc (working copy)
@@ -170,13 +170,11 @@
// Store it in the context.
int context_offset = Context::SlotOffset(slot->index());
__ mov(Operand(esi, context_offset), eax);
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
// Update the write barrier. This clobbers all involved
// registers, so we have use a third register to avoid
// clobbering esi.
__ mov(ecx, esi);
- __ RecordWrite(ecx, context_offset, eax, ebx);
-#endif
+ __ RecordWrite(ecx, context_offset, eax, ebx, kDontSaveFPRegs);
}
}
}
@@ -603,13 +601,11 @@
MemOperand location = EmitSlotSearch(dst, scratch1);
__ mov(location, src);
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
// Emit the write barrier code if the location is in the heap.
if (dst->type() == Slot::CONTEXT) {
int offset = FixedArray::kHeaderSize + dst->index() * kPointerSize;
- __ RecordWrite(scratch1, offset, src, scratch2);
+ __ RecordWrite(scratch1, offset, src, scratch2, kDontSaveFPRegs);
}
-#endif
}
@@ -678,11 +674,9 @@
} else if (function != NULL) {
VisitForAccumulatorValue(function);
__ mov(ContextOperand(esi, slot->index()), result_register());
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
int offset = Context::SlotOffset(slot->index());
__ mov(ebx, esi);
- __ RecordWrite(ebx, offset, result_register(), ecx);
-#endif
+ __ RecordWrite(ebx, offset, result_register(), ecx, kDontSaveFPRegs);
}
break;
@@ -1452,10 +1446,8 @@
int offset = FixedArray::kHeaderSize + (i * kPointerSize);
__ mov(FieldOperand(ebx, offset), result_register());
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
// Update the write barrier for the array store.
- __ RecordWrite(ebx, offset, result_register(), ecx);
-#endif
+ __ RecordWrite(ebx, offset, result_register(), ecx, kDontSaveFPRegs);
PrepareForBailoutForId(expr->GetIdForElement(i), NO_REGISTERS);
}
@@ -2024,13 +2016,11 @@
// Perform the assignment and issue the write barrier.
__ mov(target, eax);
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
// The value of the assignment is in eax. RecordWrite clobbers its
// register arguments.
__ mov(edx, eax);
int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize;
- __ RecordWrite(ecx, offset, edx, ebx);
-#endif
+ __ RecordWrite(ecx, offset, edx, ebx, kDontSaveFPRegs);
break;
}
@@ -2906,7 +2896,7 @@
VisitForAccumulatorValue(args->at(1)); // Load the value.
__ pop(ebx); // eax = value. ebx = object.
- NearLabel done;
+ Label done;
// If the object is a smi, return the value.
__ test(ebx, Immediate(kSmiTagMask));
__ j(zero, &done);
@@ -2918,12 +2908,10 @@
// Store the value.
__ mov(FieldOperand(ebx, JSValue::kValueOffset), eax);
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
// Update the write barrier. Save the value as it will be
// overwritten by the write barrier code and is needed afterward.
__ mov(edx, eax);
- __ RecordWrite(ebx, JSValue::kValueOffset, edx, ecx);
-#endif
+ __ RecordWrite(ebx, JSValue::kValueOffset, edx, ecx, kDontSaveFPRegs);
__ bind(&done);
context()->Plug(eax);
@@ -3206,16 +3194,14 @@
__ mov(Operand(index_2, 0), object);
__ mov(Operand(index_1, 0), temp);
-#ifdef ENABLE_CARDMARKING_WRITE_BARRIER
Label new_space;
__ InNewSpace(elements, temp, equal, &new_space);
__ mov(object, elements);
- __ RecordWriteHelper(object, index_1, temp);
- __ RecordWriteHelper(elements, index_2, temp);
+ __ RecordWriteHelper(object, index_1, temp, kDontSaveFPRegs);
+ __ RecordWriteHelper(elements, index_2, temp, kDontSaveFPRegs);
__ bind(&new_space);
-#endif
// We are done. Drop elements from the stack, and return undefined.
__ add(Operand(esp), Immediate(3 * kPointerSize));
« no previous file with comments | « src/ia32/codegen-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698