ART: Move kDexNoIndex to dex_file_types.h
Define the constant with the types to allow lowering the dependency
on DexFile.
Test: m
Change-Id: I3c61421db45be96d2057e01b1a7825883d8bd178
diff --git a/runtime/type_lookup_table.h b/runtime/type_lookup_table.h
index fd68deb..780b380 100644
--- a/runtime/type_lookup_table.h
+++ b/runtime/type_lookup_table.h
@@ -17,12 +17,14 @@
#ifndef ART_RUNTIME_TYPE_LOOKUP_TABLE_H_
#define ART_RUNTIME_TYPE_LOOKUP_TABLE_H_
-#include "dex_file.h"
+#include "dex_file_types.h"
#include "leb128.h"
#include "utf.h"
namespace art {
+class DexFile;
+
/**
* TypeLookupTable used to find class_def_idx by class descriptor quickly.
* Implementation of TypeLookupTable is based on hash table.
@@ -40,7 +42,7 @@
}
// Method search class_def_idx by class descriptor and it's hash.
- // If no data found then the method returns DexFile::kDexNoIndex
+ // If no data found then the method returns dex::kDexNoIndex.
ALWAYS_INLINE uint32_t Lookup(const char* str, uint32_t hash) const {
uint32_t pos = hash & GetSizeMask();
// Thanks to special insertion algorithm, the element at position pos can be empty or start of
@@ -51,12 +53,12 @@
return GetClassDefIdx(entry->data);
}
if (entry->IsLast()) {
- return DexFile::kDexNoIndex;
+ return dex::kDexNoIndex;
}
pos = (pos + entry->next_pos_delta) & GetSizeMask();
entry = &entries_[pos];
}
- return DexFile::kDexNoIndex;
+ return dex::kDexNoIndex;
}
// Method creates lookup table for dex file