summaryrefslogtreecommitdiffstats
path: root/libdexfile/dex/dex_file_verifier.h
diff options
context:
space:
mode:
authorAndreas Gampe <agampe@google.com>2018-12-28 09:39:56 -0800
committerAndreas Gampe <agampe@google.com>2019-01-02 10:32:25 -0800
commit3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf (patch)
tree365d20ad6b68ff1dbd4903764b63880324136e4d /libdexfile/dex/dex_file_verifier.h
parent0f0a4e40667c87fbd4ae5480eddbfd701bfabfa2 (diff)
downloadart-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.gz
art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.tar.bz2
art-3f1dcd39e134d994ac88dcc4f30ec8cabcd8decf.zip
ART: Move dex structs into own header
Separating out the structs from DexFile allows them to be forward- declared, which reduces the need to include the dex_file header. Bug: 119869270 Test: m Change-Id: I32dde5a632884bca7435cd584b4a81883de2e7b4
Diffstat (limited to 'libdexfile/dex/dex_file_verifier.h')
-rw-r--r--libdexfile/dex/dex_file_verifier.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/libdexfile/dex/dex_file_verifier.h b/libdexfile/dex/dex_file_verifier.h
index a81df48398..b51a417297 100644
--- a/libdexfile/dex/dex_file_verifier.h
+++ b/libdexfile/dex/dex_file_verifier.h
@@ -79,7 +79,7 @@ class DexFileVerifier {
bool CheckMap();
uint32_t ReadUnsignedLittleEndian(uint32_t size);
- bool CheckAndGetHandlerOffsets(const DexFile::CodeItem* code_item,
+ bool CheckAndGetHandlerOffsets(const dex::CodeItem* code_item,
uint32_t* handler_offsets, uint32_t handlers_size);
bool CheckClassDataItemField(uint32_t idx,
uint32_t access_flags,
@@ -95,7 +95,7 @@ class DexFileVerifier {
size_t* remaining_directs);
ALWAYS_INLINE
bool CheckOrder(const char* type_descr, uint32_t curr_index, uint32_t prev_index);
- bool CheckStaticFieldTypes(const DexFile::ClassDef* class_def);
+ bool CheckStaticFieldTypes(const dex::ClassDef* class_def);
bool CheckPadding(size_t offset, uint32_t aligned_offset, DexFile::MapItemType type);
bool CheckEncodedValue();
@@ -110,7 +110,7 @@ class DexFileVerifier {
ClassAccessor::Field* field,
bool* have_class,
dex::TypeIndex* class_type_index,
- const DexFile::ClassDef** class_def);
+ const dex::ClassDef** class_def);
// Check all methods of the given type from the given iterator. Load the class data from the first
// method, if necessary (and return it), or use the given values.
bool CheckIntraClassDataItemMethods(ClassAccessor::Method* method,
@@ -119,7 +119,7 @@ class DexFileVerifier {
size_t num_directs,
bool* have_class,
dex::TypeIndex* class_type_index,
- const DexFile::ClassDef** class_def);
+ const dex::ClassDef** class_def);
bool CheckIntraCodeItem();
bool CheckIntraStringDataItem();
@@ -166,9 +166,9 @@ class DexFileVerifier {
// Load a field/method/proto Id by index. Checks whether the index is in bounds, printing the
// error if not. If there is an error, null is returned.
- const DexFile::FieldId* CheckLoadFieldId(uint32_t idx, const char* error_fmt);
- const DexFile::MethodId* CheckLoadMethodId(uint32_t idx, const char* error_fmt);
- const DexFile::ProtoId* CheckLoadProtoId(dex::ProtoIndex idx, const char* error_fmt);
+ const dex::FieldId* CheckLoadFieldId(uint32_t idx, const char* error_fmt);
+ const dex::MethodId* CheckLoadMethodId(uint32_t idx, const char* error_fmt);
+ const dex::ProtoId* CheckLoadProtoId(dex::ProtoIndex idx, const char* error_fmt);
void ErrorStringPrintf(const char* fmt, ...)
__attribute__((__format__(__printf__, 2, 3))) COLD_ATTR;
@@ -182,7 +182,7 @@ class DexFileVerifier {
bool FindClassIndexAndDef(uint32_t index,
bool is_field,
dex::TypeIndex* class_type_index,
- const DexFile::ClassDef** output_class_def);
+ const dex::ClassDef** output_class_def);
// Check validity of the given access flags, interpreted for a field in the context of a class
// with the given second access flags.
@@ -247,7 +247,7 @@ class DexFileVerifier {
std::string failure_reason_;
// Set of type ids for which there are ClassDef elements in the dex file.
- std::unordered_set<decltype(DexFile::ClassDef::class_idx_)> defined_classes_;
+ std::unordered_set<decltype(dex::ClassDef::class_idx_)> defined_classes_;
// Cached string indices for "interesting" entries wrt/ method names. Will be populated by
// FindStringRangesForMethodNames (which is automatically called before verifying the