Add AllocStackTrace(). Move InternalStackTrace to managed heap.
Replaces trace.method and trace.pc with IntArray and ObjectArray<Method>.
Exception_tests pass.
Change-Id: I54431bbf8031b186fdd360ec27a31b11c8eff052
diff --git a/src/class_linker.h b/src/class_linker.h
index c85fb4e..b62433c 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -126,6 +126,11 @@
const DexFile& FindDexFile(const DexCache* dex_cache) const;
DexCache* FindDexCache(const DexFile& dex_file) const;
+ template <class T>
+ ObjectArray<T>* AllocObjectArray(size_t length) {
+ return ObjectArray<T>::Alloc(GetClassRoot(kObjectArrayClass), length);
+ }
+
ObjectArray<StackTraceElement>* AllocStackTraceElementArray(size_t length);
private:
@@ -153,10 +158,6 @@
DexCache* AllocDexCache(const DexFile& dex_file);
Field* AllocField();
Method* AllocMethod();
- template <class T>
- ObjectArray<T>* AllocObjectArray(size_t length) {
- return ObjectArray<T>::Alloc(GetClassRoot(kObjectArrayClass), length);
- }
CodeAndDirectMethods* AllocCodeAndDirectMethods(size_t length);
Class* CreatePrimitiveClass(const char* descriptor);