/* must be in same order as defined in parserule.c:InitSpecialProcs */

#define StdM_prefix	0
#define StdM_compare	1
#define StdM_index	2
#define StdM_plus	3
#define StdM_intplus	4
#define StdM_fixnumplus	5
#define StdM_length	6
#define StdM_unify	7
#define StdM_postfix	8
#define StdM_hashValue	9
#define StdM_lookup	10
#define StdM_MaxValid (StdM_filler11-1)
#define StdM_filler11	11

/*extern MethodTable FindMethodTable[];*/

#define MaxSpecialProcArgs 4
struct SpecialProcDesc {
    Name name;
    char flags; char nArgs;
    short index; /* in MethodTable */
    ExType result;
    ExType arg[MaxSpecialProcArgs];
};
#define MaxSpecialProcs 18
extern struct SpecialProcDesc SpecialProcs[MaxSpecialProcs];

#define MethodName(i) (SpecialProcs[i].name)

#define GEN_INDEX(x, i) ({ struct Any __x__ = x; \
     (*__x__.type->desc->stdMethods[StdM_index])(__x__, i); })

#define GEN_LOOKUP(x, index) ({ struct Any __x__ = x; \
     (*__x__.type->desc->stdMethods[StdM_lookup])(__x__, index); })

#define GEN_LENGTH(x) ({ struct Any __x__ = x; \
     (*(IntMethod)__x__.type->desc->stdMethods[StdM_length])(__x__); })
