aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/lang/natClassLoader.cc
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2006-05-10 17:50:09 +0000
committerAndrew Haley <aph@gcc.gnu.org>2006-05-10 17:50:09 +0000
commite68dbbf5a350cef4a1328be3b7df5c0795eaf490 (patch)
tree6df3edea30a838676834be375fbf606f04883fbc /libjava/java/lang/natClassLoader.cc
parente080b30bd77baf678c00c504042ce92c83299e74 (diff)
downloadgcc-e68dbbf5a350cef4a1328be3b7df5c0795eaf490.zip
gcc-e68dbbf5a350cef4a1328be3b7df5c0795eaf490.tar.gz
gcc-e68dbbf5a350cef4a1328be3b7df5c0795eaf490.tar.bz2
natClassLoader.cc: Add comments.
2006-05-10 Andrew Haley <aph@redhat.com> * java/lang/natClassLoader.cc: Add comments. From-SVN: r113677
Diffstat (limited to 'libjava/java/lang/natClassLoader.cc')
-rw-r--r--libjava/java/lang/natClassLoader.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/libjava/java/lang/natClassLoader.cc b/libjava/java/lang/natClassLoader.cc
index 43e624a..6b3c3ef 100644
--- a/libjava/java/lang/natClassLoader.cc
+++ b/libjava/java/lang/natClassLoader.cc
@@ -156,6 +156,30 @@ _Jv_UnregisterInitiatingLoader (jclass klass, java::lang::ClassLoader *loader)
loader->loadedClasses->remove(klass->name->toString());
}
+
+// Class registration.
+//
+// There are two kinds of functions that register classes.
+//
+// Type 1:
+//
+// These take the address of a class that is in an object file.
+// Because these classes are not allocated on the heap, It is also
+// necessary to register the address of the object for garbage
+// collection. This is used with the "old" C++ ABI and with
+// -findirect-dispatch -fno-indirect-classes.
+//
+// Type 2:
+//
+// These take an initializer struct, create the class, and return the
+// address of the newly created class to their caller. These are used
+// with -findirect-dispatch.
+//
+// _Jv_RegisterClasses() and _Jv_RegisterClasses_Counted() are
+// functions of Type 1, and _Jv_NewClassFromInitializer() and
+// _Jv_RegisterNewClasses() are of Type 2.
+
+
// This function is called many times during startup, before main() is
// run. At that point in time we know for certain we are running
// single-threaded, so we don't need to lock when adding classes to the