@@ -262,7 +262,7 @@ static inline size_t getstrlen(String * x) {
263// Already checked it's a CT_CON
263// Already checked it's a CT_CON
264#define CTAG(x) (((Con*)(x))->tag)
264#define CTAG(x) (((Con*)(x))->tag)
265−#define CARITY(x) (((Con*)(x))->arity)
265+#define CARITY(x) (((Con*)(x))->hdr.u16) // hdr.u16 used to store arity
267#define TAG(x) (ISINT(x) || x == NULL ? (-1) : ( GETTY(x) == CT_CON ? CTAG((Con*)x) : (-1)) )
267#define TAG(x) (ISINT(x) || x == NULL ? (-1) : ( GETTY(x) == CT_CON ? CTAG((Con*)x) : (-1)) )
268#define ARITY(x) (ISINT(x) || x == NULL ? (-1) : ( GETTY(x) == CT_CON ? CARITY((Con*)x) : (-1)) )
268#define ARITY(x) (ISINT(x) || x == NULL ? (-1) : ( GETTY(x) == CT_CON ? CARITY((Con*)x) : (-1)) )
@@ -369,7 +369,8 @@ void idris_free(void* ptr, size_t size);
369static inline void updateConF(Con * cl, unsigned tag, unsigned arity) {
369static inline void updateConF(Con * cl, unsigned tag, unsigned arity) {
370 SETTY(cl, CT_CON);
370 SETTY(cl, CT_CON);
371 cl->tag = tag;
371 cl->tag = tag;
372+ // hdr.u16 used to store arity
372− cl->arity = arity;
373+ cl->hdr.u16 = arity;
373 assert(cl->hdr.sz == sizeof(*cl) + sizeof(VAL) * arity);
374 assert(cl->hdr.sz == sizeof(*cl) + sizeof(VAL) * arity);
374 // cl->hdr.sz = sizeof(*cl) + sizeof(VAL) * arity;
375 // cl->hdr.sz = sizeof(*cl) + sizeof(VAL) * arity;
@@ -378,7 +379,8 @@ static inline Con * allocConF(VM * vm, unsigned tag, unsigned arity, int outer)
378 Con * cl = iallocate(vm, sizeof(*cl) + sizeof(VAL) * arity, outer);
379 Con * cl = iallocate(vm, sizeof(*cl) + sizeof(VAL) * arity, outer);
379 SETTY(cl, CT_CON);
380 SETTY(cl, CT_CON);
380 cl->tag = tag;
381 cl->tag = tag;
382+ // hdr.u16 used to store arity
381− cl->arity = arity;
383+ cl->hdr.u16 = arity;
382 return cl;
384 return cl;