Refactor the compilers out of libart.
This builds three separate compilers and dynamically links with the right one
at runtime.
Change-Id: I59d22b9884f41de733c09f97e29ee290236d5f4b
diff --git a/src/java_lang_Runtime.cc b/src/java_lang_Runtime.cc
index 96337af..07af162 100644
--- a/src/java_lang_Runtime.cc
+++ b/src/java_lang_Runtime.cc
@@ -31,7 +31,7 @@
void Runtime_gc(JNIEnv*, jclass) {
ScopedThreadStateChange tsc(Thread::Current(), Thread::kRunnable);
- Heap::CollectGarbage(false);
+ Runtime::Current()->GetHeap()->CollectGarbage(false);
}
void Runtime_nativeExit(JNIEnv* env, jclass, jint status, jboolean isExit) {
@@ -67,15 +67,15 @@
}
jlong Runtime_maxMemory(JNIEnv* env, jclass) {
- return Heap::GetMaxMemory();
+ return Runtime::Current()->GetHeap()->GetMaxMemory();
}
jlong Runtime_totalMemory(JNIEnv* env, jclass) {
- return Heap::GetTotalMemory();
+ return Runtime::Current()->GetHeap()->GetTotalMemory();
}
jlong Runtime_freeMemory(JNIEnv* env, jclass) {
- return Heap::GetFreeMemory();
+ return Runtime::Current()->GetHeap()->GetFreeMemory();
}
static JNINativeMethod gMethods[] = {