diff options
Diffstat (limited to 'runtime/class_linker.h')
| -rw-r--r-- | runtime/class_linker.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/runtime/class_linker.h b/runtime/class_linker.h index e4d9c96696..efe29d3127 100644 --- a/runtime/class_linker.h +++ b/runtime/class_linker.h @@ -775,7 +775,11 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Locks::dex_lock_, !Roles::uninterruptible_); - // For early bootstrapping by Init + // For early bootstrapping by Init. + // If we do not allow moving classes (`art::kMovingClass` is false) or if + // parameter `kMovable` is false (or both), the class object is allocated in + // the non-moving space. + template <bool kMovable = true> ObjPtr<mirror::Class> AllocClass(Thread* self, ObjPtr<mirror::Class> java_lang_Class, uint32_t class_size) @@ -789,6 +793,12 @@ class ClassLinker { REQUIRES_SHARED(Locks::mutator_lock_) REQUIRES(!Roles::uninterruptible_); + // Allocate a primitive array class. + ObjPtr<mirror::Class> AllocPrimitiveArrayClass(Thread* self, + ObjPtr<mirror::Class> java_lang_Class) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Roles::uninterruptible_); + ObjPtr<mirror::DexCache> AllocDexCache(/*out*/ ObjPtr<mirror::String>* out_location, Thread* self, const DexFile& dex_file) @@ -1206,6 +1216,20 @@ class ClassLinker { void SetClassRoot(ClassRoot class_root, ObjPtr<mirror::Class> klass) REQUIRES_SHARED(Locks::mutator_lock_); + // Allocate primitive array class for primitive with class root + // `primitive_class_root`, and associate it to class root + // `primitive_array_class_root`. + // + // Also check this class returned when searching system classes for + // `descriptor` matches the allocated class. + void AllocAndSetPrimitiveArrayClassRoot(Thread* self, + ObjPtr<mirror::Class> java_lang_Class, + ClassRoot primitive_array_class_root, + ClassRoot primitive_class_root, + const char* descriptor) + REQUIRES_SHARED(Locks::mutator_lock_) + REQUIRES(!Roles::uninterruptible_); + // Return the quick generic JNI stub for testing. const void* GetRuntimeQuickGenericJniStub() const; |