Convert Class::descriptor_ from StringPiece to String (as part of image loading)
Change-Id: Iab5ffa353661a7c06ee79af1f40d399a53777174
diff --git a/src/class_linker.h b/src/class_linker.h
index e83c850..bc7a780 100644
--- a/src/class_linker.h
+++ b/src/class_linker.h
@@ -72,7 +72,7 @@
}
PathClassLoader* AllocPathClassLoader(std::vector<const DexFile*> dex_files);
- Class* CreatePrimitiveClass(const StringPiece& descriptor);
+ Class* CreatePrimitiveClass(const char* descriptor);
Class* CreateArrayClass(const StringPiece& descriptor,
ClassLoader* class_loader);
@@ -114,7 +114,7 @@
// Inserts a class into the class table. Returns true if the class
// was inserted.
- bool InsertClass(Class* klass);
+ bool InsertClass(const StringPiece& descriptor, Class* klass);
bool InitializeSuperClass(Class* klass);
@@ -156,10 +156,10 @@
std::vector<DexCache*> dex_caches_;
- // multimap from String::descriptor_ to Class* instances. Results
- // should be compared for a matching Class::descriptor_ and
- // Class::class_loader_.
- typedef std::tr1::unordered_multimap<StringPiece, Class*> Table;
+ // multimap from a StringPiece hash code of a class descriptor to
+ // Class* instances. Results should be compared for a matching
+ // Class::descriptor_ and Class::class_loader_.
+ typedef std::tr1::unordered_multimap<size_t, Class*> Table;
Table classes_;
Mutex* classes_lock_;