alt-gc-package-defs.scm 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. ; Copyright (c) 1993-2008 by Richard Kelsey and Jonathan Rees. See file COPYING.
  2. ; These are used to compile the VM separately from the GC. It has new
  3. ; definitions of the heap and GC structures with all of the values defined
  4. ; as externals.
  5. (define-structure allocation allocation-interface
  6. (open prescheme)
  7. (begin
  8. (define s48-make-available+gc
  9. (external "s48_make_availableAgc" (=> (integer) null)))
  10. (define s48-allocate-small
  11. (external "s48_allocate_small" (=> (integer) address)))
  12. (define s48-allocate-weak+gc
  13. (external "s48_allocate_weakAgc" (=> (integer) address)))
  14. (define s48-allocate-traced+gc
  15. (external "s48_allocate_tracedAgc" (=> (integer) address)))
  16. (define s48-allocate-untraced+gc
  17. (external "s48_allocate_untracedAgc" (=> (integer) address)))
  18. (define s48-allocate-untraced-unmovable+gc
  19. (external "s48_allocate_untraced_unmovableAgc" (=> (integer) address)))
  20. ))
  21. (define-structure heap heap-interface
  22. (open prescheme)
  23. (begin
  24. (define s48-available
  25. (external "s48_available" (=> () integer)))
  26. (define s48-heap-size
  27. (external "s48_heap_size" (=> () integer)))
  28. (define s48-max-heap-size
  29. (external "s48_max_heap_size" (=> () integer)))
  30. (define s48-gather-objects
  31. (external "s48_gather_objects" (=> ((=> (integer) boolean)
  32. (=> ((=> (integer) boolean)) boolean))
  33. integer)))
  34. (define s48-find-all
  35. (external "s48_find_all" (=> (integer) integer)))
  36. (define s48-find-all-records
  37. (external "s48_find_all_records" (=> (integer) integer)))
  38. (define s48-write-barrier
  39. (external "S48_WRITE_BARRIER" (=> (integer address integer) null)))
  40. (define s48-stob-in-heap?
  41. (external "s48_stob_in_heapP" (=> (integer) boolean)))
  42. ))
  43. (define-structure gc gc-interface
  44. (open prescheme)
  45. (begin
  46. (define s48-collect
  47. (external "s48_collect" (=> (boolean) null)))
  48. (define s48-trace-value
  49. (external "s48_trace_value" (=> (integer) integer)))
  50. (define s48-trace-locations!
  51. (external "s48_trace_locationsB" (=> (address address) null)))
  52. (define s48-trace-stob-contents!
  53. (external "s48_trace_stob_contentsB" (=> (integer) null)))
  54. (define s48-trace-continuation-contents!
  55. (external "s48_trace_continuation_contentsB"
  56. (=> (address address integer) null)))
  57. (define s48-extant?
  58. (external "s48_extantP" (=> (integer) boolean)))
  59. (define s48-gc-count
  60. (external "s48_gc_count" (=> () integer)))
  61. (define s48-gc-run-time
  62. (external "s48_gc_run_time" (=> () integer integer)))
  63. ))