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

Unified Diff: src/builtins.cc

Issue 7945009: Merge experimental/gc branch to the bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 3 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/assembler.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
===================================================================
--- src/builtins.cc (revision 9327)
+++ src/builtins.cc (working copy)
@@ -33,6 +33,7 @@
#include "builtins.h"
#include "gdb-jit.h"
#include "ic-inl.h"
+#include "mark-compact.h"
#include "vm-state-inl.h"
namespace v8 {
@@ -295,6 +296,7 @@
if (mode == UPDATE_WRITE_BARRIER) {
heap->RecordWrites(dst->address(), dst->OffsetOfElementAt(dst_index), len);
}
+ heap->incremental_marking()->RecordWrites(dst);
}
@@ -313,6 +315,7 @@
if (mode == UPDATE_WRITE_BARRIER) {
heap->RecordWrites(dst->address(), dst->OffsetOfElementAt(dst_index), len);
}
+ heap->incremental_marking()->RecordWrites(dst);
}
@@ -358,6 +361,14 @@
former_start[to_trim] = heap->fixed_array_map();
former_start[to_trim + 1] = Smi::FromInt(len - to_trim);
+ // Maintain marking consistency for HeapObjectIterator and
+ // IncrementalMarking.
+ int size_delta = to_trim * kPointerSize;
+ if (heap->marking()->TransferMark(elms->address(),
+ elms->address() + size_delta)) {
+ MemoryChunk::IncrementLiveBytes(elms->address(), -size_delta);
+ }
+
return FixedArray::cast(HeapObject::FromAddress(
elms->address() + to_trim * kPointerSize));
}
@@ -551,9 +562,7 @@
}
if (!heap->lo_space()->Contains(elms)) {
- // As elms still in the same space they used to be,
- // there is no need to update region dirty mark.
- array->set_elements(LeftTrimFixedArray(heap, elms, 1), SKIP_WRITE_BARRIER);
+ array->set_elements(LeftTrimFixedArray(heap, elms, 1));
} else {
// Shift the elements.
AssertNoAllocation no_gc;
@@ -842,7 +851,7 @@
}
elms = LeftTrimFixedArray(heap, elms, delta);
- array->set_elements(elms, SKIP_WRITE_BARRIER);
+ array->set_elements(elms);
} else {
AssertNoAllocation no_gc;
MoveElements(heap, &no_gc,
« no previous file with comments | « src/assembler.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698