[sgen] Get rid of `sgen_client_vtable_has_references()`.
authorMark Probst <mark.probst@gmail.com>
Wed, 14 Jan 2015 01:11:12 +0000 (17:11 -0800)
committerMark Probst <mark.probst@gmail.com>
Wed, 29 Apr 2015 18:00:08 +0000 (11:00 -0700)
mono/metadata/sgen-client-mono.h
mono/metadata/sgen-marksweep.c

index 80839d384e5225ec8520727a340905792bdad3f4..458aebd4913fd41584ce159248862e1bc6ae486b 100644 (file)
@@ -191,13 +191,6 @@ sgen_client_object_is_array_fill (GCObject *o)
        return ((MonoObject*)o)->synchronisation == GINT_TO_POINTER (-1);
 }
 
-/* FIXME: Why do we even need this?  Can't we get it from the descriptor? */
-static gboolean G_GNUC_UNUSED
-sgen_client_vtable_has_references (GCVTable *vt)
-{
-       return ((MonoVTable*)vt)->klass->has_references;
-}
-
 static MONO_ALWAYS_INLINE void G_GNUC_UNUSED
 sgen_client_pre_copy_checks (char *destination, GCVTable *gc_vtable, void *obj, mword objsize)
 {
index 6034678a9b5740ec3a7a8e6d849f959dd3292810..f84a898af84144b432129b64401613f3cd67f05a 100644 (file)
@@ -1689,7 +1689,7 @@ count_nonpinned_callback (char *obj, size_t size, void *data)
 {
        GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
 
-       if (sgen_client_vtable_has_references (vtable))
+       if (SGEN_VTABLE_HAS_REFERENCES (vtable))
                ++count_nonpinned_ref;
        else
                ++count_nonpinned_nonref;
@@ -1700,7 +1700,7 @@ count_pinned_callback (char *obj, size_t size, void *data)
 {
        GCVTable *vtable = (GCVTable*)LOAD_VTABLE (obj);
 
-       if (sgen_client_vtable_has_references (vtable))
+       if (SGEN_VTABLE_HAS_REFERENCES (vtable))
                ++count_pinned_ref;
        else
                ++count_pinned_nonref;