Remove TypeLookupTable from DexFile.
One more step towards removing runtime dependencies from the DexFile
API. This severs the ties to OatFile. Work remains to move MemMap out
of DexFile.
Bug: 22322814
Change-Id: I29e7ad8fd292c7919ed2689dc754b958b88d6819
Test: test-art-host
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index db6a709..d8ac581 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -526,7 +526,7 @@
} else {
const char* descriptor = m->GetDeclaringClassDescriptor();
const DexFile::ClassDef* class_def =
- dex_file->FindClassDef(descriptor, ComputeModifiedUtf8Hash(descriptor));
+ OatDexFile::FindClassDef(*dex_file, descriptor, ComputeModifiedUtf8Hash(descriptor));
if (class_def != nullptr) {
uint16_t class_def_index = dex_file->GetIndexForClassDef(*class_def);
const OatFile::OatClass oat_class = oat_dex_file->GetOatClass(class_def_index);
@@ -742,7 +742,7 @@
if (oat_dex_file.GetLookupTableData() != nullptr) {
uint32_t table_offset = dchecked_integral_cast<uint32_t>(
oat_dex_file.GetLookupTableData() - oat_file_begin);
- uint32_t table_size = TypeLookupTable::RawDataLength(*dex_file);
+ uint32_t table_size = TypeLookupTable::RawDataLength(dex_file->NumClassDefs());
os << StringPrintf("type-table: 0x%08x..0x%08x\n",
table_offset,
table_offset + table_size - 1);