+ ; takes in a expr annotated with types and returns a type-less AST
+ ; with stack values wrapped
+(define (annotate-stack-values data-layout ann-e)
+ (define (struct-type? type)
+ (assoc type data-layout))
+ (define (strip e)
+ (ast-traverse strip (ann-expr e)))
+ (let* ([e (ann-expr ann-e)]
+ [type (ann-type ann-e)])
+ (if (struct-type? type)
+ `(struct ,(type-size data-layout type) ,(ast-traverse strip e))
+ (ast-traverse (lambda (x)
+ (annotate-stack-values data-layout x))
+ e))))