         [ forget-struct-slot-accessors ]
         [ forget-struct-slot-values-method ]
         [ forget-clone-method ]
+        [ forget-equal-method ]
         [ { "c-type" "layout" "struct-size" } remove-word-props ]
         [ call-next-method ]
     } cleave ;


: offset-of ( field struct -- offset )
    struct-slots slot-named offset>> ; inline

M: struct equal?
    2dup [ class-of ] same? [
        [ struct-slot-values ] same?
    ] [ 2drop f ] if ; inline

M: struct hashcode*
    nip dup >c-ptr [ struct-slot-values hashcode ] [ drop 0 ] if ; inline

USING: accessors alien alien.c-types alien.data alien.parser
arrays assocs byte-arrays classes classes.parser classes.private
classes.struct.bit-accessors classes.tuple classes.tuple.parser
classes.tuple.private combinators combinators.short-circuit
combinators.smart cpu.architecture definitions delegate.private
effects functors.backend generalizations generic generic.parser
io kernel kernel.private lexer libc math math.order parser
quotations sequences sequences.private slots slots.private
specialized-arrays stack-checker.dependencies summary vectors
vocabs.loader vocabs.parser words ;
