shared-interfaces.scm 2.8 KB

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