summaryrefslogtreecommitdiffstats
path: root/runtime
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-12-10 22:33:21 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-12-10 22:33:23 +0000
commit4381cd6760b5b0b772322b2257bc2ced5d05da5d (patch)
treee1cee5c05eb71db441f4f612a49a46e348d8fbf5 /runtime
parent2cd6142727f1d9e5b71e942ea4c56e3c3810f8d0 (diff)
parentfe382b5296ef132316d8883a0bdf8cb00d40d16b (diff)
downloadart-4381cd6760b5b0b772322b2257bc2ced5d05da5d.tar.gz
art-4381cd6760b5b0b772322b2257bc2ced5d05da5d.tar.bz2
art-4381cd6760b5b0b772322b2257bc2ced5d05da5d.zip
Merge "Revert "Ensure void type is resolved when running without image""
Diffstat (limited to 'runtime')
-rw-r--r--runtime/class_linker.cc25
1 files changed, 0 insertions, 25 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 609478d126..1f4cf8fcfc 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -575,23 +575,6 @@ void ClassLinker::InitWithoutImage(const std::vector<const DexFile*>& boot_class
FindSystemClass(self, "[Ljava/lang/StackTraceElement;"));
mirror::StackTraceElement::SetClass(GetClassRoot(kJavaLangStackTraceElement));
- // Ensure void type is resolved in the core's dex cache so java.lang.Void is correctly
- // initialized.
- {
- const DexFile& dex_file = java_lang_Object->GetDexFile();
- const DexFile::StringId* void_string_id = dex_file.FindStringId("V");
- CHECK(void_string_id != nullptr);
- uint32_t void_string_index = dex_file.GetIndexForStringId(*void_string_id);
- const DexFile::TypeId* void_type_id = dex_file.FindTypeId(void_string_index);
- CHECK(void_type_id != nullptr);
- uint16_t void_type_idx = dex_file.GetIndexForTypeId(*void_type_id);
- // Now we resolve void type so the dex cache contains it. We use java.lang.Object class
- // as referrer so the used dex cache is core's one.
- mirror::Class* resolved_type = ResolveType(dex_file, void_type_idx, java_lang_Object.Get());
- CHECK_EQ(resolved_type, GetClassRoot(kPrimitiveVoid));
- self->AssertNoPendingException();
- }
-
FinishInit(self);
VLOG(startup) << "ClassLinker::InitFromCompiler exiting";
@@ -3727,14 +3710,6 @@ bool ClassLinker::VerifyClassUsingOatFile(const DexFile& dex_file, mirror::Class
return false;
}
- // We may be running with a preopted oat file but without image. In this case,
- // we don't skip verification of preverified classes to ensure we initialize
- // dex caches with all types resolved during verification.
- if (!Runtime::Current()->IsCompiler() &&
- !Runtime::Current()->GetHeap()->HasImageSpace()) {
- return false;
- }
-
uint16_t class_def_index = klass->GetDexClassDefIndex();
oat_file_class_status = oat_dex_file->GetOatClass(class_def_index).GetStatus();
if (oat_file_class_status == mirror::Class::kStatusVerified ||