Merge branch 'bdw-gc-static-alloc'
authorLudovic Courtès <ludo@gnu.org>
Sun, 1 Nov 2009 17:17:31 +0000 (18:17 +0100)
committerLudovic Courtès <ludo@gnu.org>
Sun, 1 Nov 2009 17:17:31 +0000 (18:17 +0100)
Conflicts:
acinclude.m4
libguile/__scm.h
libguile/bdw-gc.h
libguile/eval.c

1  2 
libguile/__scm.h
libguile/_scm.h
libguile/bdw-gc.h
libguile/eval.c
libguile/strings.c
libguile/strings.h
libguile/tags.h
libguile/vectors.c
libguile/weaks.c

   * and then SCM_API marks them for export. */
  #define SCM_INTERNAL  extern
  
 -#if (defined __GNUC__)
 +/* The SCM_DEPRECATED macro is used in declarations of deprecated functions
 + * or variables.  Defining `SCM_BUILDING_DEPRECATED_CODE' allows deprecated
 + * functions to be implemented in terms of deprecated functions, and allows
 + * deprecated functions to be referred to by `scm_c_define_gsubr ()'.  */
 +#if !defined (SCM_BUILDING_DEPRECATED_CODE)   \
 +    && defined (__GNUC__) && (__GNUC__ >= 3)
 +# define SCM_DEPRECATED  SCM_API __attribute__ ((__deprecated__))
 +#else
 +# define SCM_DEPRECATED  SCM_API
 +#endif
 +
+ /* The SCM_ALIGNED macro, when defined, can be used to instruct the compiler
+  * to honor the given alignment constraint.  */
 -#elif (defined __INTEL_COMPILER)
++#if defined __GNUC__
+ # define SCM_ALIGNED(x)  __attribute__ ((aligned (x)))
++#elif defined __INTEL_COMPILER
+ # define SCM_ALIGNED(x)  __declspec (align (x))
+ #else
+ /* Don't know how to align things.  */
+ # undef SCM_ALIGNED
+ #endif
  
  \f
  /* {Supported Options}
diff --cc libguile/_scm.h
Simple merge
  typedef void *GC_PTR;
  #endif
  
 -#endif /* SCM_BOEHM_GC_H */
+ /* Return true if PTR points to the heap.  */
+ #define SCM_I_IS_POINTER_TO_THE_HEAP(ptr)     \
+   (GC_base (ptr) != NULL)
+ /* Register a disappearing link for the object pointed to by OBJ such that
+    the pointer pointed to be LINK is cleared when OBJ is reclaimed.  Do so
+    only if OBJ actually points to the heap.  See
+    http://thread.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/2563
+    for details.  */
+ #define SCM_I_REGISTER_DISAPPEARING_LINK(link, obj)           \
+   ((SCM_I_IS_POINTER_TO_THE_HEAP (obj))                               \
+    ? GC_GENERAL_REGISTER_DISAPPEARING_LINK ((link), (obj))    \
+    : 0)
 +#endif /* SCM_BDW_GC_H */
diff --cc libguile/eval.c
Simple merge
Simple merge
Simple merge
diff --cc libguile/tags.h
Simple merge
Simple merge
Simple merge