desc_base.h 535 Bytes
Newer Older
1
2
3
#ifndef __DESC_BASE_H
#define __DESC_BASE_H

4
enum FunType {
5
    FT_BOXED_LIT, FT_RECORD, FT_ADT, FT_CAF, FT_CAF_REDUCED, FT_FUN, FT_SLICE, FT_PRIM1, FT_PRIM2
6
};
7
8

struct Desc {
Laszlo Domoszlai's avatar
GC    
Laszlo Domoszlai committed
9
10
11
12
13
    struct 
    {
        FunType type : 4;
        unsigned int arity : 8;         // LIMITATION: maximum 32 arguments
        unsigned int thunk_size : 10;   // It gives false result for strings and arrays
Laszlo Domoszlai's avatar
Laszlo Domoszlai committed
14
        unsigned int unboxable : 1;     // TODO: not uses, remove?
Laszlo Domoszlai's avatar
GC    
Laszlo Domoszlai committed
15
16
17
18
        unsigned int hnf : 1;
    };
    
    void (*eval)();
19
20
21
};

#endif // __DESC_H