* src/vm/classcache.cpp (classcache_get_loaded_classes): Removed obsolete method.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Thu, 24 Sep 2009 07:53:50 +0000 (09:53 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Thu, 24 Sep 2009 07:53:50 +0000 (09:53 +0200)
The logic of this method is already present in classcache_foreach_loaded_class.
* src/vm/classcache.hpp: Likewise.

src/vm/classcache.cpp
src/vm/classcache.hpp

index f0900e2289860f5c4af9d62a47b072610289abad..9023da15045778be679990f9f01536fd5ffb7d23 100644 (file)
@@ -1388,66 +1388,6 @@ s4 classcache_get_loaded_class_count(void)
 }
 
 
-/* classcache_get_loaded_classes ***********************************************
-
-   Returns an array of all loaded classes as array.  The array is
-   allocaed on the Java heap.
-
-*******************************************************************************/
-
-#if defined(ENABLE_JVMTI)
-void classcache_get_loaded_classes(s4 *class_count_ptr,
-                                                                  classinfo ***classes_ptr)
-{
-       classinfo              **classes;
-       s4                       class_count;
-       classcache_name_entry   *en;
-       classcache_class_entry  *clsen;
-       s4                       i;
-       s4                       j;
-
-       CLASSCACHE_LOCK();
-
-       /* get the number of loaded classes and allocate the array */
-
-       class_count = classcache_number_of_loaded_classes();
-
-       classes = GCMNEW(classinfo*, class_count);
-
-       /* look in every slot of the hashtable */
-
-       for (i = 0, j = 0; i < hashtable_classcache.size; i++) {
-               /* iterate over hashlink */
-
-               for (en = hashtable_classcache.ptr[i]; en != NULL; en = en->hashlink) {
-                       /* filter pseudo classes $NEW$, $NULL$, $ARRAYSTUB$ out */
-
-                       if (en->name->text[0] == '$')
-                               continue;
-
-                       /* iterate over classes with same name */
-
-                       for (clsen = en->classes; clsen != NULL; clsen = clsen->next) {
-                               /* get only loaded classes */
-
-                               if (clsen->classobj != NULL) {
-                                       classes[j] = clsen->classobj;
-                                       j++;
-                               }
-                       }
-               }
-       }
-
-       /* pass the return values */
-
-       *class_count_ptr = class_count;
-       *classes_ptr     = classes;
-
-       CLASSCACHE_UNLOCK();
-}
-#endif /* defined(ENABLE_JVMTI) */
-
-
 /* classcache_foreach_loaded_class *********************************************
 
    Calls the given function for each loaded class.
index aef65e21c4e4af5fccea718c8f8a04cbd2410a4e..d3ea496533748034d752967e0a34f43e29fd611e 100644 (file)
@@ -146,11 +146,6 @@ s4 classcache_get_loaded_class_count(void);
 void classcache_foreach_loaded_class(classcache_foreach_functionptr_t func,
                                                                         void *data);
 
-#if defined(ENABLE_JVMTI)
-void classcache_get_loaded_classes(s4 *class_count_ptr,
-                                                                  classinfo ***classes_ptr);
-#endif
-
 #ifndef NDEBUG
 void classcache_debug_dump(FILE *file,utf *only);
 #endif