Refactor the use of Method by the compiler.
Remove the dependence on the Method object in dex2oat, allowing lazier
resolution.
Introduce new find and iterators in DexFile to simplify common
operations and avoid misuse of class data items.
Change-Id: I39fb8252190f543d89d8b233076355cec310fe08
diff --git a/src/class_linker.h b/src/class_linker.h
index 03c8341..478a260 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -282,7 +282,7 @@
void AppendToBootClassPath(const DexFile& dex_file, SirtRef<DexCache>& dex_cache);
void ConstructFieldMap(const DexFile& dex_file, const DexFile::ClassDef& dex_class_def,
- Class* c, std::map<int, Field*>& field_map);
+ Class* c, std::map<uint32_t, Field*>& field_map);
size_t SizeOfClass(const DexFile& dex_file,
const DexFile::ClassDef& dex_class_def);
@@ -296,15 +296,11 @@
const DexFile::ClassDef& dex_class_def,
SirtRef<Class>& klass);
- void LoadField(const DexFile& dex_file,
- const DexFile::Field& dex_field,
- SirtRef<Class>& klass,
+ void LoadField(const DexFile& dex_file, const ClassDataItemIterator& it, SirtRef<Class>& klass,
SirtRef<Field>& dst);
- void LoadMethod(const DexFile& dex_file,
- const DexFile::Method& dex_method,
- SirtRef<Class>& klass,
- SirtRef<Method>& dst);
+ void LoadMethod(const DexFile& dex_file, const ClassDataItemIterator& dex_method,
+ SirtRef<Class>& klass, SirtRef<Method>& dst);
// Inserts a class into the class table. Returns true if the class
// was inserted.