A few more trivial write barrier calls.
Change-Id: I4b0f3c4347eed9a2e0a494ae1382065c026d5c40
diff --git a/src/heap.cc b/src/heap.cc
index eb15f91..6228fcc 100644
--- a/src/heap.cc
+++ b/src/heap.cc
@@ -156,10 +156,6 @@
return obj;
}
-void Heap::WriteBarrier(const Object* obj) {
- // TODO: mark obj's card.
-}
-
bool Heap::IsHeapAddress(const Object* obj) {
// Note: we deliberately don't take the lock here, and mustn't test anything that would
// require taking the lock.
diff --git a/src/heap.h b/src/heap.h
index 773789b..1c2b7c9 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -139,7 +139,9 @@
// Must be called if a field of an Object in the heap changes, and before any GC safe-point.
// The call is not needed if NULL is stored in the field.
- static void WriteBarrier(const Object* object);
+ static void WriteBarrier(const Object* object) {
+ // TODO: re-enable card marking when concurrent collector is active.
+ }
private:
// Allocates uninitialized storage.
diff --git a/src/java_lang_System.cc b/src/java_lang_System.cc
index 2bb767d..398eeb9 100644
--- a/src/java_lang_System.cc
+++ b/src/java_lang_System.cc
@@ -187,8 +187,7 @@
if (sameDimensions && srcComponentType->InstanceOf(dstComponentType)) {
// Yes. Bulk copy.
move32(dstBytes + dstPos * width, srcBytes + srcPos * width, length * width);
- UNIMPLEMENTED(WARNING) << "write barriers in System.arraycopy";
- //dvmWriteBarrierArray(dstArray, dstPos, dstPos + length);
+ Heap::WriteBarrier(dstArray);
return;
}
@@ -228,8 +227,7 @@
}
move32(dstBytes + dstPos * width, srcBytes + srcPos * width, copyCount * width);
- UNIMPLEMENTED(WARNING) << "write barriers in System.arraycopy";
- //dvmWriteBarrierArray(dstArray, 0, copyCount);
+ Heap::WriteBarrier(dstArray);
if (copyCount != length) {
std::string actualSrcType(PrettyType(srcObj[copyCount]));
std::string dstType(PrettyType(dstArray));
diff --git a/src/object.h b/src/object.h
index b9cab1d..3d11009 100644
--- a/src/object.h
+++ b/src/object.h
@@ -2269,7 +2269,7 @@
dst_offset = MemberOffset(dst_offset.Uint32Value() + sizeof(Object*));
}
}
- // TODO: bulk write barrier
+ Heap::WriteBarrier(dst);
}
}