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/class_loader.cc b/src/class_loader.cc
index 6b6297b..3adb4ec 100644
--- a/src/class_loader.cc
+++ b/src/class_loader.cc
@@ -21,27 +21,6 @@
namespace art {
-bool ClassLoader::use_compile_time_class_path = false;
-ClassLoader::Table ClassLoader::compile_time_class_paths_;
-
-const std::vector<const DexFile*>& ClassLoader::GetCompileTimeClassPath(const ClassLoader* class_loader) {
- Runtime* runtime = Runtime::Current();
- if (class_loader == NULL) {
- return runtime->GetClassLinker()->GetBootClassPath();
- }
- CHECK(ClassLoader::UseCompileTimeClassPath());
- Table::const_iterator it = compile_time_class_paths_.find(class_loader);
- CHECK(it != compile_time_class_paths_.end());
- return it->second;
-}
-
-void ClassLoader::SetCompileTimeClassPath(const ClassLoader* class_loader,
- std::vector<const DexFile*>& class_path) {
- CHECK(!Runtime::Current()->IsStarted());
- use_compile_time_class_path = true;
- compile_time_class_paths_[class_loader] = class_path;
-}
-
// TODO: get global references for these
Class* PathClassLoader::dalvik_system_PathClassLoader_ = NULL;
@@ -49,7 +28,7 @@
CHECK(!Runtime::Current()->IsStarted());
DCHECK(dalvik_system_PathClassLoader_ != NULL);
SirtRef<PathClassLoader> p(down_cast<PathClassLoader*>(dalvik_system_PathClassLoader_->AllocObject()));
- SetCompileTimeClassPath(p.get(), dex_files);
+ Runtime::Current()->SetCompileTimeClassPath(p.get(), dex_files);
return p.get();
}