;; -*- Mode: Irken -*- ;; XXX this has to be in vm.scm for now. ;; fix this by putting the memory-read stuff in an closure/object. (datatype stree (:node stree stree) (:term) (:char char) (:unichar int) (:cstr string) (:uni32 (list int)) (:indirect int) (:double-indirect int) (:indirect-args int (list int)) (:double-indirect-args int (list int)) ) (define stree->sexp (stree:node l r) -> (sexp (stree->sexp l) (stree->sexp r)) (stree:term) -> (sexp (sym 'term)) (stree:char ch) -> (sexp:char ch) (stree:unichar n) -> (sexp (sym 'unichar) (int n)) (stree:cstr s) -> (sexp (sym 'cstr) (string s)) other -> (sexp (sym 'other)) )