Compile without warnings with -Wall.
[cacao.git] / src / vm / jit / inline / sets.h
1 #ifndef __SET__
2 #define __SET__
3
4 typedef struct methSet     methSet;
5 typedef struct methSetNode  methSetNode;
6 typedef struct fldSet      fldSet;
7 typedef struct fldSetNode   fldSetNode;
8 typedef struct classSet    classSet;
9 typedef struct classSetNode classSetNode;
10
11
12 /*------------------------------------------------------------*/
13 /*-- flds used by a method set fns */
14 /*------------------------------------------------------------*/
15 struct fldSet {
16   fldSetNode *head;
17   fldSetNode *tail;
18   fldSetNode *pos;
19   s4 length;
20   };
21
22
23 struct fldSetNode {
24   fieldinfo *fldRef;
25   fldSetNode *nextfldRef;
26   bool writePUT;
27   bool readGET;
28   classSetNode *lastptrPUT; 
29   classSetNode *lastptrGET; 
30   s2 index;
31   };
32 fldSetNode      *inFldSet (fldSetNode *, fieldinfo *);
33 fldSetNode      *addFldRef(fldSetNode *, fieldinfo *);
34 fldSet          *add2FldSet(fldSet    *, fieldinfo *, bool, bool);
35 fldSet          *createFldSet();
36 int              printFldSet  (fldSetNode *);
37 int              printFieldSet (fldSet *);
38
39
40 /*------------------------------------------------------------*/
41 /*-- methodinfo call set fns */
42 /*------------------------------------------------------------*/
43 struct methSet {
44   methSetNode *head;
45   methSetNode *tail;
46   methSetNode *pos;
47   s4 length;
48   };
49
50 struct methSetNode {
51   methodinfo   *methRef;
52   methSetNode  *nextmethRef;
53   classSetNode *lastptrIntoClassSet2;
54   s2            index;
55   s4            monoPoly;
56   };
57
58 int              inMethSet (methSetNode *, methodinfo *);
59 methSetNode     *addMethRef(methSetNode *, methodinfo *);
60 methSet         *add2MethSet(methSet    *, methodinfo *);
61 methSet         *createMethSet();
62 int              printMethSet   (methSetNode *);
63 int              printMethodSet (methSet *);
64
65 /*------------------------------------------------------------*/
66 /*-- classinfo XTA set fns  */
67 /*------------------------------------------------------------*/
68
69 struct classSet {
70   classSetNode *head;
71   classSetNode *tail;
72   classSetNode *pos;
73   s4 length;
74   };
75
76 struct classSetNode {
77   classinfo *classType;
78   classSetNode *nextClass;
79   s2 index;
80   };
81
82 int             inSet    (classSetNode *, classinfo *);
83 classSetNode *  addElement(classSetNode *,  classinfo *);
84 classSet     *  add2ClassSet(classSet *,  classinfo *);
85 classSet     *  createClassSet();
86 int             inRange (classSetNode *, classinfo *);
87 classSetNode *  addClassCone(classSetNode *,  classinfo *);
88 classSetNode *   intersectSubtypesWithSet(classinfo *, classSetNode *); 
89 int             sizeOfSet(classSetNode *s);
90 int             setSize(classSetNode *);
91 int             printSet(classSetNode *);
92 int             printClassSet(classSet *);
93
94 #endif