Revert "Load app images"
Fails when a method is duplicated (see test 097-duplicate-method)
Bug: 22858531
This reverts commit f7fd970244f143b1abb956e29794c446e4d57f46.
Change-Id: Ib30ae5be00cc568e799290be6b3c8f29cbbe4c20
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index d503dd4..f1fd0c3 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -120,25 +120,11 @@
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!dex_lock_);
- // Initialize class linker from one or more boot images.
- bool InitFromBootImage(std::string* error_msg)
+ // Initialize class linker from one or more images.
+ bool InitFromImage(std::string* error_msg)
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!dex_lock_);
- // Add an image space to the class linker, may fix up classloader fields and dex cache fields.
- // The dex files that were newly opened for the space are placed in the out argument
- // out_dex_files. Returns true if the operation succeeded.
- // The space must be already added to the heap before calling AddImageSpace since we need to
- // properly handle read barriers and object marking.
- bool AddImageSpace(gc::space::ImageSpace* space,
- Handle<mirror::ClassLoader> class_loader,
- jobjectArray dex_elements,
- const char* dex_location,
- std::vector<std::unique_ptr<const DexFile>>* out_dex_files,
- std::string* error_msg)
- REQUIRES(!dex_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
-
// Finds a class by its descriptor, loading it if necessary.
// If class_loader is null, searches boot_class_path_.
mirror::Class* FindClass(Thread* self,
@@ -999,16 +985,8 @@
SHARED_REQUIRES(Locks::mutator_lock_)
REQUIRES(!Locks::classlinker_classes_lock_);
- void UpdateAppImageClassLoadersAndDexCaches(
- gc::space::ImageSpace* space,
- Handle<mirror::ClassLoader> class_loader,
- Handle<mirror::ObjectArray<mirror::DexCache>> dex_caches,
- bool added_class_table)
- REQUIRES(!dex_lock_)
- SHARED_REQUIRES(Locks::mutator_lock_);
-
std::vector<const DexFile*> boot_class_path_;
- std::vector<std::unique_ptr<const DexFile>> boot_dex_files_;
+ std::vector<std::unique_ptr<const DexFile>> opened_dex_files_;
mutable ReaderWriterMutex dex_lock_ DEFAULT_MUTEX_ACQUIRED_AFTER;
// JNI weak globals and side data to allow dex caches to get unloaded. We lazily delete weak