Add InitializedStaticStorage table
A non-null entry in the table not only provides access to the storage,
it also implies that the referenced type is initialized.
Change-Id: Ief9e88b7e58b65b6f9456a4218b7fe87f71c17bb
diff --git a/src/object.h b/src/object.h
index 51bf999..d299c5b 100644
--- a/src/object.h
+++ b/src/object.h
@@ -25,6 +25,7 @@
class Monitor;
class Method;
class Object;
+class StaticStorageBase;
class String;
template<class T> class ObjectArray;
template<class T> class PrimitiveArray;
@@ -720,10 +721,11 @@
// short cuts to declaring_class_->dex_cache_ members for fast compiled code
// access
ObjectArray<String>* dex_cache_strings_;
- ObjectArray<Class>* dex_cache_types_;
- ObjectArray<Method>* dex_cache_methods_;
- ObjectArray<Field>* dex_cache_fields_;
+ ObjectArray<Class>* dex_cache_resolved_types_;
+ ObjectArray<Method>* dex_cache_resolved_methods_;
+ ObjectArray<Field>* dex_cache_resolved_fields_;
CodeAndDirectMethods* dex_cache_code_and_direct_methods_;
+ ObjectArray<StaticStorageBase>* dex_cache_initialized_static_storage_;
bool is_direct_;
@@ -899,8 +901,14 @@
DISALLOW_IMPLICIT_CONSTRUCTORS(PathClassLoader);
};
+// Type for the InitializedStaticStorage table. Currently the Class
+// provides the static storage. However, this might change to improve
+// image sharing, so we use this type to avoid assumptions on the
+// current storage.
+class StaticStorageBase {};
+
// Class objects.
-class Class : public Object {
+class Class : public Object, public StaticStorageBase {
public:
// Class Status