summaryrefslogtreecommitdiffstats
path: root/vm/Init.h
diff options
context:
space:
mode:
authorDan Bornstein <danfuzz@android.com>2011-03-22 14:47:44 -0700
committerDan Bornstein <danfuzz@android.com>2011-03-22 16:45:14 -0700
commitc399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1 (patch)
tree8a4174b0acde27e7ac694757262550d3d43aa73b /vm/Init.h
parentfdbec44654895d58aad01f84596b2d35faa1e2e4 (diff)
downloadandroid_dalvik-c399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1.tar.gz
android_dalvik-c399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1.tar.bz2
android_dalvik-c399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1.zip
Pull the globals iteration into InitRefs.
This gives the new GC a way to iterate over the global object refs defined in Globals.h, without having to have detailed knowledge of the list of such refs. However, this change doesn't actually modify the GC code in question, since it is not currently in a working state anyway. InitRefs.c probably wants a slightly different name. Suggestions welcome. Bonus: Cleaned up a vaguely-related clause in Class.c. Change-Id: I406987c56ddf310c61d877574071c46f3717fc72
Diffstat (limited to 'vm/Init.h')
-rw-r--r--vm/Init.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/vm/Init.h b/vm/Init.h
index 4d85c2ede..ef56f26e8 100644
--- a/vm/Init.h
+++ b/vm/Init.h
@@ -58,6 +58,15 @@ bool dvmFindRequiredClassesAndMembers(void);
*/
bool dvmFindReferenceMembers(ClassObject* classReference);
+typedef void ObjectReferenceCallback(Object** pReference);
+
+/*
+ * Perform a callback on each of the object references used directly
+ * by the VM. The value passed into the callback is a pointer to where
+ * the reference is stored.
+ */
+void dvmForEachRequiredReference(ObjectReferenceCallback* callback);
+
/*
* Replacement for fprintf() when we want to send a message to the console.
* This defaults to fprintf(), but will use the JNI fprintf callback if