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

Unified Diff: src/ia32/stub-cache-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/macro-assembler-ia32.cc ('k') | src/incremental-marking.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/stub-cache-ia32.cc
===================================================================
--- src/ia32/stub-cache-ia32.cc (revision 7503)
+++ src/ia32/stub-cache-ia32.cc (working copy)
@@ -1464,7 +1464,7 @@
if (argc == 1) { // Otherwise fall through to call builtin.
Label exit, attempt_to_grow_elements;
- Label with_write_barrier;
+ NearLabel with_write_barrier;
// Get the array's length into eax and calculate new length.
__ mov(eax, FieldOperand(edx, JSArray::kLengthOffset));
@@ -1498,17 +1498,9 @@
__ bind(&with_write_barrier);
- __ IncrementalMarkingRecordWrite(ebx,
- ecx,
- edx,
- OMIT_SMI_CHECK,
- PRESERVE_OBJECT,
- DESTROY_VALUE,
- PRESERVE_SCRATCH);
+ __ RecordWrite(
+ ebx, edx, ecx, EMIT_REMEMBERED_SET, kDontSaveFPRegs, OMIT_SMI_CHECK);
- __ InNewSpace(ebx, ecx, equal, &exit);
-
- __ RecordWriteHelper(ebx, edx, ecx, kDontSaveFPRegs);
__ ret((argc + 1) * kPointerSize);
__ bind(&attempt_to_grow_elements);
@@ -1516,6 +1508,10 @@
__ jmp(&call_builtin);
}
+ // We could be lucky and the elements array could be at the top of
+ // new-space. In this case we can just grow it in place by moving the
+ // allocation pointer up.
+
ExternalReference new_space_allocation_top =
ExternalReference::new_space_allocation_top_address();
ExternalReference new_space_allocation_limit =
@@ -1547,13 +1543,13 @@
Immediate(Factory::the_hole_value()));
}
- __ IncrementalMarkingRecordWrite(ebx,
- ecx,
- edx,
- INLINE_SMI_CHECK,
- PRESERVE_OBJECT,
- DESTROY_VALUE,
- DESTROY_SCRATCH);
+ // We know the elements array is in new space so we don't need the
+ // remembered set, but we just pushed a value onto it so we may have to
+ // tell the incremental marker to rescan the object that we just grew. We
+ // don't need to worry about the holes because they are in old space and
+ // already marked black.
+ __ mov(edi, ebx);
+ __ RecordWrite(edi, edx, ecx, OMIT_REMEMBERED_SET, kDontSaveFPRegs);
// Restore receiver to edx as finish sequence assumes it's here.
__ mov(edx, Operand(esp, (argc + 1) * kPointerSize));
@@ -2621,13 +2617,8 @@
__ j(zero, &done);
__ mov(ecx, eax);
- __ IncrementalMarkingRecordWrite(ebx,
- ecx,
- edx,
- INLINE_SMI_CHECK,
- DESTROY_OBJECT,
- DESTROY_VALUE,
- DESTROY_SCRATCH);
+ // Cells are always in the remembered set.
+ __ RecordWrite(ebx, edx, ecx, OMIT_REMEMBERED_SET, kDontSaveFPRegs);
// Return the value (register eax).
__ bind(&done);
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/incremental-marking.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698