arch.scm 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. ;;; Ported from Scheme 48 1.9. See file COPYING for notices and license.
  2. ;;;
  3. ;;; Port Author: Andrew Whatson
  4. ;;;
  5. ;;; Original Authors: Richard Kelsey
  6. ;;;
  7. ;;; scheme48-1.9.2/ps-compiler/node/arch.scm
  8. ;;;
  9. ;;; These are all of the primitives that are known to the compiler.
  10. ;;;
  11. ;;; The enumeration is needed by the expander for LET-NODES so it ends up
  12. ;;; being loaded into two separate packages.
  13. (define-module (ps-compiler node arch)
  14. #:use-module (prescheme s48-defenum)
  15. #:re-export (enum name->enumerand enumerand->name)
  16. #:export (primop-enum
  17. primop-enum-count))
  18. (define-enumeration primop-enum
  19. (
  20. ; Nontrivial Primops
  21. call ; see below
  22. tail-call
  23. return
  24. jump
  25. throw
  26. unknown-call
  27. unknown-tail-call
  28. unknown-return
  29. dispatch ; (dispatch <cont1> ... <contN> <exp>)
  30. let ; (let <lambda-node> . <args>)
  31. letrec1 ; (letrec1 (lambda (x v1 v2 ...)
  32. letrec2 ; (letrec2 <cont> x <lambda1> <lambda2> ...)))
  33. cell-set!
  34. global-set!
  35. undefined-effect ; (undefined-effect . <maybe-args>)
  36. ; Trivial Primops
  37. make-cell
  38. cell-ref
  39. global-ref
  40. ; Environment stuff, these are both trivial
  41. closure
  42. env-ref
  43. ))