summaryrefslogtreecommitdiff
path: root/runtime/class_linker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/class_linker.cc')
-rw-r--r--runtime/class_linker.cc32
1 files changed, 3 insertions, 29 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index fbb47bdfae..131ebf8bb2 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -1242,15 +1242,8 @@ mirror::DexCache* ClassLinker::AllocDexCache(Thread* self, const DexFile& dex_fi
if (fields.get() == NULL) {
return NULL;
}
- SirtRef<mirror::ObjectArray<mirror::StaticStorageBase> >
- initialized_static_storage(self,
- AllocObjectArray<mirror::StaticStorageBase>(self, dex_file.NumTypeIds()));
- if (initialized_static_storage.get() == NULL) {
- return NULL;
- }
-
dex_cache->Init(&dex_file, location.get(), strings.get(), types.get(), methods.get(),
- fields.get(), initialized_static_storage.get());
+ fields.get());
return dex_cache.get();
}
@@ -1905,7 +1898,6 @@ mirror::ArtMethod* ClassLinker::LoadMethod(Thread* self, const DexFile& dex_file
dst->SetDexCacheStrings(klass->GetDexCache()->GetStrings());
dst->SetDexCacheResolvedMethods(klass->GetDexCache()->GetResolvedMethods());
dst->SetDexCacheResolvedTypes(klass->GetDexCache()->GetResolvedTypes());
- dst->SetDexCacheInitializedStaticStorage(klass->GetDexCache()->GetInitializedStaticStorage());
uint32_t access_flags = it.GetMemberAccessFlags();
@@ -2390,22 +2382,7 @@ mirror::Class* ClassLinker::LookupClassFromImage(const char* descriptor) {
for (int32_t i = 0; i < dex_caches->GetLength(); ++i) {
mirror::DexCache* dex_cache = dex_caches->Get(i);
const DexFile* dex_file = dex_cache->GetDexFile();
- // First search using the class def map, but don't bother for non-class types.
- if (descriptor[0] == 'L') {
- const DexFile::StringId* descriptor_string_id = dex_file->FindStringId(descriptor);
- if (descriptor_string_id != NULL) {
- const DexFile::TypeId* type_id =
- dex_file->FindTypeId(dex_file->GetIndexForStringId(*descriptor_string_id));
- if (type_id != NULL) {
- mirror::Class* klass = dex_cache->GetResolvedType(dex_file->GetIndexForTypeId(*type_id));
- if (klass != NULL) {
- self->EndAssertNoThreadSuspension(old_no_suspend_cause);
- return klass;
- }
- }
- }
- }
- // Now try binary searching the string/type index.
+ // Try binary searching the string/type index.
const DexFile::StringId* string_id = dex_file->FindStringId(descriptor);
if (string_id != NULL) {
const DexFile::TypeId* type_id =
@@ -2941,8 +2918,6 @@ static void CheckProxyMethod(mirror::ArtMethod* method,
CHECK_EQ(prototype->GetDexCacheStrings(), method->GetDexCacheStrings());
CHECK_EQ(prototype->GetDexCacheResolvedMethods(), method->GetDexCacheResolvedMethods());
CHECK_EQ(prototype->GetDexCacheResolvedTypes(), method->GetDexCacheResolvedTypes());
- CHECK_EQ(prototype->GetDexCacheInitializedStaticStorage(),
- method->GetDexCacheInitializedStaticStorage());
CHECK_EQ(prototype->GetDexMethodIndex(), method->GetDexMethodIndex());
MethodHelper mh(method);
@@ -4097,11 +4072,10 @@ mirror::Class* ClassLinker::ResolveType(const DexFile& dex_file, uint16_t type_i
// Convert a ClassNotFoundException to a NoClassDefFoundError.
SirtRef<mirror::Throwable> cause(self, self->GetException(NULL));
if (cause->InstanceOf(GetClassRoot(kJavaLangClassNotFoundException))) {
- SirtRef<mirror::Class> sirt_resolved(self, resolved);
+ DCHECK(resolved == NULL); // No SirtRef needed to preserve resolved.
Thread::Current()->ClearException();
ThrowNoClassDefFoundError("Failed resolution of: %s", descriptor);
self->GetException(NULL)->SetCause(cause.get());
- resolved = sirt_resolved.get();
}
}
}