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.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/runtime/class_linker.cc b/runtime/class_linker.cc
index 57eb72dea5..c2c2e2c928 100644
--- a/runtime/class_linker.cc
+++ b/runtime/class_linker.cc
@@ -2278,6 +2278,10 @@ bool ClassLinker::AddImageSpace(gc::space::ImageSpace* space,
}, space->Begin(), image_pointer_size_);
}
+ for (auto dex_cache : dex_caches.Iterate<mirror::DexCache>()) {
+ CHECK(!dex_cache->GetDexFile()->IsCompactDexFile());
+ }
+
ScopedTrace trace("AppImage:UpdateCodeItemAndNterp");
bool can_use_nterp = interpreter::CanRuntimeUseNterp();
uint16_t hotness_threshold = runtime->GetJITOptions()->GetWarmupThreshold();
@@ -2287,7 +2291,7 @@ bool ClassLinker::AddImageSpace(gc::space::ImageSpace* space,
if (method.HasCodeItem()) {
const dex::CodeItem* code_item = method.GetDexFile()->GetCodeItem(
reinterpret_cast32<uint32_t>(method.GetDataPtrSize(image_pointer_size_)));
- method.SetCodeItem(code_item, method.GetDexFile()->IsCompactDexFile());
+ method.SetCodeItem(code_item);
// The hotness counter may have changed since we compiled the image, so
// reset it with the runtime value.
method.ResetCounter(hotness_threshold);
@@ -4025,7 +4029,7 @@ void ClassLinker::LoadMethod(const DexFile& dex_file,
if (Runtime::Current()->IsAotCompiler()) {
dst->SetDataPtrSize(reinterpret_cast32<void*>(code_item_offset), image_pointer_size_);
} else {
- dst->SetCodeItem(dex_file.GetCodeItem(code_item_offset), dex_file.IsCompactDexFile());
+ dst->SetCodeItem(dex_file.GetCodeItem(code_item_offset));
}
}
@@ -4081,6 +4085,7 @@ void ClassLinker::LoadClass(Thread* self,
const DexFile& dex_file,
const dex::ClassDef& dex_class_def,
Handle<mirror::Class> klass) {
+ CHECK(!dex_file.IsCompactDexFile());
ClassAccessor accessor(dex_file,
dex_class_def,
/* parse_hiddenapi_class_data= */ klass->IsBootStrapClassLoaded());
@@ -5200,8 +5205,7 @@ void ClassLinker::ResolveMethodExceptionHandlerTypes(ArtMethod* method) {
CHECK(method->GetDexFile()->IsInDataSection(handlers_ptr))
<< method->PrettyMethod()
<< "@" << method->GetDexFile()->GetLocation()
- << "@" << reinterpret_cast<const void*>(handlers_ptr)
- << " is_compact_dex=" << method->GetDexFile()->IsCompactDexFile();
+ << "@" << reinterpret_cast<const void*>(handlers_ptr);
uint32_t handlers_size = DecodeUnsignedLeb128(&handlers_ptr);
for (uint32_t idx = 0; idx < handlers_size; idx++) {