scheme48write-barrier.h 841 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Part of Scheme 48 1.9. See file COPYING for notices and license.
  3. *
  4. * Authors: Richard Kelsey, Jonathan Rees, David Frese
  5. */
  6. #ifdef S48_GC_BIBOP
  7. #ifdef __COMPILING_SCHEME48_ITSELF__
  8. /* The VM has only a few occurrences, which we want to inline. */
  9. #include "area_roots.h"
  10. #define S48_WRITE_BARRIER(stob, address, value) \
  11. s48_write_barrier_inline((stob), (address), (value))
  12. #else
  13. /*
  14. * For external code, the inlined version may be too hefty. Use the
  15. * separate version here.
  16. */
  17. extern void s48_write_barrier(long stob, char* address, long value);
  18. #define S48_WRITE_BARRIER(stob, address, value) \
  19. s48_write_barrier((stob), (address), (value))
  20. #endif
  21. #elif defined(S48_GC_TWOSPACE)
  22. /*
  23. * No write barrier is needed for the two-space collector;
  24. */
  25. #define S48_WRITE_BARRIER(stob, address, value) ((void)0)
  26. #endif