whalesong/simulator-structs.rkt
2011-03-04 13:52:22 -05:00

24 lines
605 B
Racket

#lang typed/racket/base
(provide (all-defined-out))
(require "il-structs.rkt")
(define-struct: machine ([val : Any]
[proc : Any]
[env : (Listof Any)]
[control : (Listof frame)]
[pc : Natural] ;; program counter
[text : (Vectorof Statement)] ;; text of the program
)
#:transparent)
(define-struct: frame ([return : Symbol])
#:transparent)
;; Primitive procedure wrapper
(define-struct: primitive-proc ([f : (Any * -> Any)]))