shared-interfaces.scm 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ; Part of Scheme 48 1.9. See file COPYING for notices and license.
  2. ; Authors: Richard Kelsey, Jonathan Rees, Marcus Crestani, David Frese,
  3. ; Mike Sperber, Martin Gasbichler
  4. ; Two interfaces that are shared with the Scheme code. We can't share the
  5. ; structure definitions, but this is a start.
  6. (define-interface vm-architecture-interface
  7. (export architecture-version
  8. (enum :syntax) ;so you don't have to remember to open enumerated
  9. bits-used-per-byte byte-limit two-byte-limit
  10. (interrupt :syntax)
  11. interrupt-count
  12. (memory-status-option :syntax)
  13. (op :syntax)
  14. op-count
  15. opcode-arg-specs
  16. (exception :syntax)
  17. (stob :syntax)
  18. stob-count
  19. least-b-vector-type
  20. stob-data
  21. (time-option :syntax)
  22. (channel-status-option :syntax)
  23. (channel-parameter-option :syntax)
  24. (port-status-options :syntax)
  25. (current-port-marker :syntax)
  26. (text-encoding-option :syntax)
  27. (system-parameter-option :syntax)
  28. maximum-stack-args
  29. two-byte-nargs-protocol
  30. two-byte-nargs+list-protocol
  31. ignore-values-protocol
  32. args+nargs-protocol
  33. nary-dispatch-protocol
  34. bottom-of-stack-protocol
  35. call-with-values-protocol
  36. big-stack-protocol
  37. maximum-external-call-args
  38. native-protocol-mask
  39. default-stack-space
  40. continuation-stack-size
  41. available-stack-space
  42. continuation-cells
  43. continuation-cont-index
  44. continuation-pc-index
  45. continuation-code-index
  46. gc-mask-size-offset
  47. gc-mask-offset
  48. exception-continuation-cells
  49. exception-cont-size-index
  50. exception-cont-pc-index
  51. exception-cont-code-index
  52. exception-cont-exception-index
  53. exception-cont-instruction-size-index
  54. native-exception-continuation-cells
  55. native-exception-cont-size-index
  56. native-exception-cont-exception-index
  57. native-exception-cont-bc-pc-index
  58. native-exception-cont-bc-code-index
  59. ))
  60. ; Data structures
  61. (define-interface vm-data-interface
  62. (export bytes-per-cell bits-per-byte bits-per-cell addressing-units-per-cell
  63. bytes->cells
  64. cells->bytes
  65. a-units->cells
  66. cells->a-units
  67. bytes->a-units
  68. vm-eq?
  69. (tag :syntax)
  70. fixnum? immediate? header? stob?
  71. tag-field-width
  72. make-tag&immediate-type
  73. enter-fixnum extract-fixnum
  74. bits-per-fixnum greatest-fixnum-value least-fixnum-value
  75. too-small-for-fixnum? too-big-for-fixnum? unsigned-too-big-for-fixnum?
  76. descriptor->fixnum fixnum->stob
  77. fixnum= fixnum< fixnum> fixnum<= fixnum>=
  78. fixnum-bitwise-not fixnum-bitwise-and
  79. fixnum-bitwise-ior fixnum-bitwise-xor
  80. (imm :syntax)
  81. immediate-type-field-width
  82. undefined?
  83. true false vm-eof-object null unspecific-value unreleased-value quiescent
  84. unbound-marker unassigned-marker
  85. vm-boolean? false? enter-boolean extract-boolean
  86. bytes-per-scalar-value-unit scalar-value-units->bytes
  87. scalar-value-units->bytes bytes->scalar-value-units
  88. vm-char? vm-char=? vm-char<?
  89. enter-char extract-char scalar-value->vm-char vm-char->scalar-value
  90. make-header header-type
  91. header-type-field-width
  92. header-immutable-bit-mask
  93. header-length-in-bytes header-length-in-cells header-length-in-a-units
  94. immutable-header? make-header-immutable
  95. d-vector-header? b-vector-header?
  96. max-stob-contents-size-in-cells
  97. add-stob-tag remove-stob-tag
  98. ))