From 3df7a2f569ae58adcdda77821b671da839fd4655 Mon Sep 17 00:00:00 2001 From: Mark Probst Date: Tue, 13 Jan 2015 17:11:12 -0800 Subject: [PATCH] [sgen] Get rid of `sgen_client_vtable_has_references()`. --- mono/metadata/sgen-client-mono.h | 7 ------- mono/metadata/sgen-marksweep.c | 4 ++-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/mono/metadata/sgen-client-mono.h b/mono/metadata/sgen-client-mono.h index 80839d384e5..458aebd4913 100644 --- a/mono/metadata/sgen-client-mono.h +++ b/mono/metadata/sgen-client-mono.h @@ -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) { diff --git a/mono/metadata/sgen-marksweep.c b/mono/metadata/sgen-marksweep.c index 6034678a9b5..f84a898af84 100644 --- a/mono/metadata/sgen-marksweep.c +++ b/mono/metadata/sgen-marksweep.c @@ -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; -- 2.25.1