diff options
author | Dan Bornstein <danfuzz@android.com> | 2011-03-22 14:47:44 -0700 |
---|---|---|
committer | Dan Bornstein <danfuzz@android.com> | 2011-03-22 16:45:14 -0700 |
commit | c399ea527d0d50c6e2b4ae15fc4a3e9a18f3f1f1 (patch) | |
tree | 8a4174b0acde27e7ac694757262550d3d43aa73b /vm/Init.h | |
parent | fdbec44654895d58aad01f84596b2d35faa1e2e4 (diff) | |
download | android_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.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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 |