(define-module (modules ast assembly-tree) #:use-module (srfi srfi-9) #:export (make-subroutine subroutine? subroutine-label subroutine-instructions subroutine-frame-size make-instruction instruction? instruction-destination set-instruction-destination instruction-operator instruction-src-1 instruction-src-2 make-register register? register-name )) (define-record-type (make-subroutine label instrs f-size) subroutine? (label subroutine-label) (instrs subroutine-instructions) (f-size subroutine-frame-size)) (define-record-type (make-instruction dest op src1 src2) instruction? (dest instruction-destination set-instruction-destination) (op instruction-operator) (src1 instruction-src-1) (src2 instruction-src-2)) (define-record-type (make-register name) register? (name register-name))