Add ObjectArray::CopyOf
As part of doing this, moved Heap::Alloc* helpers to the corresponding
classes in object.h to break heap.h<->object.h cycle due to use of
Heap from ObjectArray::CopyOf (which is templatized and needs to be
defined in .h file).
Change-Id: I1870af6e9dc6552820034ead5e20d13ae4da67da
diff --git a/src/class_linker.h b/src/class_linker.h
index 086234d..738979b 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -28,8 +28,10 @@
StaticField* AllocStaticField();
InstanceField* AllocInstanceField();
Method* AllocMethod();
- template <class C> ObjectArray<C>* AllocObjectArray(size_t length) {
- return Heap::AllocObjectArray<C>(object_array_class_, length);
+
+ template <class T>
+ ObjectArray<T>* AllocObjectArray(size_t length) {
+ return ObjectArray<T>::Alloc(object_array_class_, length);
}