 combinators combinators.short-circuit combinators.smart fry
 generalizations generic.parser kernel kernel.private lexer
 libc macros make math math.order parser quotations sequences
-slots slots.private struct-arrays vectors words ;
+slots slots.private struct-arrays vectors words
+compiler.tree.propagation.transforms ;
 FROM: slots => reader-word writer-word ;
 IN: classes.struct
 

    c-type ;

PREDICATE: struct-class < tuple-class
    \ struct subclass-of? ;

: struct-slots ( struct -- slots )
    "struct-slots" word-prop ;

    } 2&& ;

: memory>struct ( ptr class -- struct )
    [ 1array ] dip slots>tuple ;

\ memory>struct [
    dup struct-class? [ '[ _ boa ] ] [ drop f ] if
] 1 define-partial-eval

: malloc-struct ( class -- struct )
    [ heap-size malloc ] keep memory>struct ; inline
