Remove code commented out by 'ifdef UNDEFINED'
authorIvan Maidanski <ivmai@mail.ru>
Mon, 25 Jul 2016 17:24:27 +0000 (20:24 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Mon, 25 Jul 2016 17:24:27 +0000 (20:24 +0300)
* finalize.c [UNDEFINED] (GC_invoke_finalizers): Remove
GC_free(curr_fo) call; update comment.
* include/private/gcconfig.h [UNDEFINED] (_etext, DATASTART): Remove.
* typd_mlc.c [UNDEFINED] (GC_make_complex_array_descriptor): Likewise.

finalize.c
include/private/gcconfig.h
typd_mlc.c

index 12fd907..8b3afa0 100644 (file)
@@ -1198,12 +1198,9 @@ GC_API int GC_CALL GC_invoke_finalizers(void)
                               curr_fo -> fo_client_data);
         curr_fo -> fo_client_data = 0;
         ++count;
-#       ifdef UNDEFINED
-            /* This is probably a bad idea.  It throws off accounting if */
-            /* nearly all objects are finalizable.  O.w. it shouldn't    */
-            /* matter.                                                   */
-            GC_free((void *)curr_fo);
-#       endif
+        /* Explicit freeing of curr_fo is probably a bad idea.  */
+        /* It throws off accounting if nearly all objects are   */
+        /* finalizable.  Otherwise it should not matter.        */
     }
     /* bytes_freed_before is initialized whenever count != 0 */
     if (count != 0 && bytes_freed_before != GC_bytes_freed) {
index 21dba21..971ba03 100644 (file)
                 /* thus allowing the heap to grow to ~3GB               */
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#            ifdef UNDEFINED    /* includes ro data */
-               extern int _etext[];
-#              define DATASTART ((ptr_t)((((word)(_etext)) + 0xfff) & ~0xfff))
-#            endif
 #            include <features.h>
 #            if defined(__GLIBC__) && __GLIBC__ >= 2 \
                 || defined(PLATFORM_ANDROID)
 #       endif
 #       ifdef __ELF__
 #            define DYNAMIC_LOADING
-#            ifdef UNDEFINED    /* includes ro data */
-               extern int _etext[];
-#              define DATASTART ((ptr_t)((((word)(_etext)) + 0xfff) & ~0xfff))
-#            endif
 #            include <features.h>
 #            define SEARCH_FOR_DATA_START
              extern int _end[];
index a5dc47a..839c314 100644 (file)
@@ -327,23 +327,6 @@ GC_make_sequence_descriptor(complex_descriptor *first,
     return((complex_descriptor *)result);
 }
 
-#ifdef UNDEFINED
-  complex_descriptor * GC_make_complex_array_descriptor(word nelements,
-                                                complex_descriptor *descr)
-  {
-    struct ComplexArrayDescriptor * result =
-        (struct ComplexArrayDescriptor *)
-                GC_malloc(sizeof(struct ComplexArrayDescriptor));
-
-    if (result != 0) {
-        result -> ad_tag = ARRAY_TAG;
-        result -> ad_nelements = nelements;
-        result -> ad_element_descr = descr;
-    }
-    return((complex_descriptor *)result);
-  }
-#endif
-
 STATIC ptr_t * GC_eobjfreelist = NULL;
 
 STATIC mse * GC_typed_mark_proc(word * addr, mse * mark_stack_ptr,