 
 M: c-type box-parameter c-type-box ;
 
-M: c-type-name box-parameter c-type box-parameter ;
-
 GENERIC: box-return ( c-type -- )
 
 M: c-type box-return f swap c-type-box ;
 
-M: c-type-name box-return c-type box-return ;
-
 GENERIC: unbox-parameter ( n c-type -- )
 
 M: c-type unbox-parameter c-type-unbox ;
 
-M: c-type-name unbox-parameter c-type unbox-parameter ;
-
 GENERIC: unbox-return ( c-type -- )
 
 M: c-type unbox-return f swap c-type-unbox ;
 
-M: c-type-name unbox-return c-type unbox-return ;
-
 : little-endian? ( -- ? ) 1 <int> *char 1 = ; foldable
 
 GENERIC: heap-size ( name -- size )
 
-M: c-type-name heap-size c-type heap-size ;
-
 M: abstract-c-type heap-size size>> ;
 
 GENERIC: stack-size ( name -- size )
-
-M: c-type-name stack-size c-type stack-size ;
 
 M: c-type stack-size size>> cell align ;
 

! Copyright (C) 2004, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: byte-arrays arrays assocs kernel kernel.private math
math.order math.parser namespaces make parser sequences strings
words splitting cpu.architecture alien alien.accessors
alien.strings quotations layouts system compiler.units io

    [
        \ swap , [ heap-size , [ * >fixnum ] % ] [ % ] bi*
    ] [ ] make ;

PROTOCOL: c-type-protocol 
    c-type-class
    c-type-boxed-class
    c-type-boxer
    c-type-boxer-quot
    c-type-unboxer
    c-type-unboxer-quot
    c-type-rep
    c-type-getter
    c-type-setter
    c-type-align
    c-type-align-first
    c-type-stack-align?
    box-parameter
    box-return
    unbox-parameter
    unbox-return
    heap-size
    stack-size ;

CONSULT: c-type-protocol c-type-name
    c-type ;

PREDICATE: typedef-word < c-type-word
    "c-type" word-prop c-type-name? ;
