summaryrefslogtreecommitdiff
path: root/runtime/mirror/dex_cache.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/dex_cache.h')
-rw-r--r--runtime/mirror/dex_cache.h37
1 files changed, 17 insertions, 20 deletions
diff --git a/runtime/mirror/dex_cache.h b/runtime/mirror/dex_cache.h
index 80cca4e737..2a16879efa 100644
--- a/runtime/mirror/dex_cache.h
+++ b/runtime/mirror/dex_cache.h
@@ -186,15 +186,14 @@ class MANAGED DexCache final : public Object {
return sizeof(DexCache);
}
- static void InitializeDexCache(Thread* self,
- ObjPtr<mirror::DexCache> dex_cache,
- ObjPtr<mirror::String> location,
- const DexFile* dex_file,
- LinearAlloc* linear_alloc,
- PointerSize image_pointer_size)
+ // Initialize native fields and allocate memory.
+ void InitializeNativeFields(const DexFile* dex_file, LinearAlloc* linear_alloc)
REQUIRES_SHARED(Locks::mutator_lock_)
REQUIRES(Locks::dex_lock_);
+ // Clear all native fields.
+ void ResetNativeFields() REQUIRES_SHARED(Locks::mutator_lock_);
+
template <ReadBarrierOption kReadBarrierOption = kWithReadBarrier, typename Visitor>
void FixupStrings(StringDexCacheType* dest, const Visitor& visitor)
REQUIRES_SHARED(Locks::mutator_lock_);
@@ -479,20 +478,18 @@ class MANAGED DexCache final : public Object {
void SetClassLoader(ObjPtr<ClassLoader> class_loader) REQUIRES_SHARED(Locks::mutator_lock_);
private:
- void Init(const DexFile* dex_file,
- ObjPtr<String> location,
- StringDexCacheType* strings,
- uint32_t num_strings,
- TypeDexCacheType* resolved_types,
- uint32_t num_resolved_types,
- MethodDexCacheType* resolved_methods,
- uint32_t num_resolved_methods,
- FieldDexCacheType* resolved_fields,
- uint32_t num_resolved_fields,
- MethodTypeDexCacheType* resolved_method_types,
- uint32_t num_resolved_method_types,
- GcRoot<CallSite>* resolved_call_sites,
- uint32_t num_resolved_call_sites)
+ void SetNativeArrays(StringDexCacheType* strings,
+ uint32_t num_strings,
+ TypeDexCacheType* resolved_types,
+ uint32_t num_resolved_types,
+ MethodDexCacheType* resolved_methods,
+ uint32_t num_resolved_methods,
+ FieldDexCacheType* resolved_fields,
+ uint32_t num_resolved_fields,
+ MethodTypeDexCacheType* resolved_method_types,
+ uint32_t num_resolved_method_types,
+ GcRoot<CallSite>* resolved_call_sites,
+ uint32_t num_resolved_call_sites)
REQUIRES_SHARED(Locks::mutator_lock_);
// std::pair<> is not trivially copyable and as such it is unsuitable for atomic operations,