Fix a bunch of warnings caused by unused functions.
authorAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 6 Jun 2014 12:41:18 +0000 (14:41 +0200)
committerAlex Rønne Petersen <alexrp@xamarin.com>
Fri, 6 Jun 2014 12:41:18 +0000 (14:41 +0200)
mono/metadata/sgen-debug.c
mono/metadata/sgen-new-bridge.c
mono/metadata/sgen-tarjan-bridge.c

index 54245bb51cd841437b3de5ef26b7838e001ddfe6..616ca6befc3750e2302ce8d96d83d9de31b072b4 100644 (file)
@@ -927,6 +927,7 @@ compare_xrefs (const void *a_ptr, const void *b_ptr)
        return 0;
 }
 
+/*
 static void
 dump_processor_state (SgenBridgeProcessor *p)
 {
@@ -951,6 +952,7 @@ dump_processor_state (SgenBridgeProcessor *p)
 
        printf ("-------\n");
 }
+*/
 
 gboolean
 sgen_compare_bridge_processor_results (SgenBridgeProcessor *a, SgenBridgeProcessor *b)
index 2f3449751eee6b83eaec649878140b85dcffb29b..ad486c0c47fbc256c713d18788d37abd68c648e7 100644 (file)
@@ -262,11 +262,13 @@ dyn_array_int_size (DynIntArray *da)
        return da->array.size;
 }
 
+#ifdef NEW_XREFS
 static void
 dyn_array_int_empty (DynIntArray *da)
 {
        dyn_array_empty (&da->array);
 }
+#endif
 
 static void
 dyn_array_int_add (DynIntArray *da, int x)
@@ -281,17 +283,13 @@ dyn_array_int_get (DynIntArray *da, int x)
        return ((int*)da->array.data)[x];
 }
 
+#ifdef NEW_XREFS
 static void
 dyn_array_int_set (DynIntArray *da, int idx, int val)
 {
        ((int*)da->array.data)[idx] = val;
 }
-
-static void
-dyn_array_int_ensure_capacity (DynIntArray *da, int capacity)
-{
-       dyn_array_ensure_capacity (&da->array, capacity, sizeof (int));
-}
+#endif
 
 static void
 dyn_array_int_ensure_independent (DynIntArray *da)
@@ -428,6 +426,7 @@ dyn_array_scc_get_ptr (DynSCCArray *da, int x)
 
 static DynIntArray merge_array;
 
+#ifdef NEW_XREFS
 static gboolean
 dyn_array_int_contains (DynIntArray *da, int x)
 {
@@ -437,6 +436,7 @@ dyn_array_int_contains (DynIntArray *da, int x)
                        return TRUE;
        return FALSE;
 }
+#endif
 
 static void
 enable_accounting (void)
index 312e73a54499b47705a53e823d0a21bd987ab16d..59013f70124aa832120f3c0a2216964bea45e1f4 100644 (file)
@@ -67,14 +67,6 @@ typedef struct {
 
 /* private */
 
-static void
-dyn_array_init (DynArray *da)
-{
-       da->size = 0;
-       da->capacity = 0;
-       da->data = NULL;
-}
-
 static void
 dyn_array_uninit (DynArray *da, int elem_size)
 {
@@ -121,12 +113,6 @@ dyn_array_add (DynArray *da, int elem_size)
 
 /* ptr */
 
-static void
-dyn_array_ptr_init (DynPtrArray *da)
-{
-       dyn_array_init (&da->array);
-}
-
 static void
 dyn_array_ptr_uninit (DynPtrArray *da)
 {
@@ -461,6 +447,7 @@ bridge_object_forward (MonoObject *obj)
        return fwd ? fwd : obj;
 }
 
+#ifdef DUMP_GRAPH
 static const char*
 safe_name_bridge (MonoObject *obj)
 {
@@ -476,7 +463,7 @@ find_or_create_data (MonoObject *obj)
                entry = create_data (obj);
        return entry;
 }
-
+#endif
 
 //----------
 typedef struct {
@@ -908,6 +895,7 @@ cleanup (void)
        num_colors_with_bridges = 0;
 }
 
+#ifdef DUMP_GRAPH
 static void
 dump_color_table (const char *why, gboolean do_index)
 {
@@ -938,6 +926,7 @@ dump_color_table (const char *why, gboolean do_index)
        }
 
 }
+#endif
 
 static gint64
 step_timer (gint64 *timer)
@@ -1036,16 +1025,6 @@ reset_xrefs (ColorData *color)
        }
 }
 
-static mono_bool
-is_bridge_object_alive (MonoObject *obj, void *data)
-{
-       SgenHashTable *table = data;
-       unsigned char *value = sgen_hash_table_lookup (table, obj);
-       if (!value)
-               return TRUE;
-       return *value;
-}
-
 static void
 processing_build_callback_data (int generation)
 {