3 Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
4 Institut f. Computersprachen, TU Wien
5 R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser, M. Probst,
6 S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich,
9 This file is part of CACAO.
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License as
13 published by the Free Software Foundation; either version 2, or (at
14 your option) any later version.
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
26 Contact: cacao@complang.tuwien.ac.at
28 Authors: Carolyn Oates
30 $Id: sets.h 1621 2004-11-30 13:06:55Z twisti $
38 typedef struct methSet methSet;
39 typedef struct methSetNode methSetNode;
40 typedef struct fldSet fldSet;
41 typedef struct fldSetNode fldSetNode;
42 typedef struct classSet classSet;
43 typedef struct classSetNode classSetNode;
47 #include "vm/global.h"
50 /*------------ Method /Class Used Markers -------------------------------*/
53 USED all methods and fields are available;
54 PARTUSED = specific methods (static, <init>, <clinit>, inherited def used, special) used,
56 NOTUSED = nothing used in class - not needed
60 USED = method definition is used
61 PARTUSED = method definition will be used if class instanciated
62 NOTUSED = method defintion never used
71 #define MONO1 1 /* potential poly that is really mono */
75 /*------------------------------------------------------------*/
76 /*-- flds used by a method set fns */
77 /*------------------------------------------------------------*/
88 fldSetNode *nextfldRef;
91 classSetNode *lastptrPUT;
92 classSetNode *lastptrGET;
97 fldSetNode *inFldSet (fldSetNode *, fieldinfo *);
98 fldSetNode *addFldRef(fldSetNode *, fieldinfo *);
99 fldSet *add2FldSet(fldSet *, fieldinfo *, bool, bool);
100 fldSet *createFldSet();
101 int printFldSet(fldSetNode *);
102 int printFieldSet(fldSet *);
105 /*------------------------------------------------------------*/
106 /*-- methodinfo call set fns */
107 /*------------------------------------------------------------*/
118 methSetNode *nextmethRef;
119 classSetNode *lastptrIntoClassSet2;
125 int inMethSet (methSetNode *, methodinfo *);
126 methSetNode *addMethRef(methSetNode *, methodinfo *);
127 methSet *add2MethSet(methSet *, methodinfo *);
128 methSet *createMethSet();
129 int printMethSet (methSetNode *);
130 int printMethodSet (methSet *);
133 /*------------------------------------------------------------*/
134 /*-- classinfo XTA set fns */
135 /*------------------------------------------------------------*/
145 struct classSetNode {
146 classinfo *classType;
147 classSetNode *nextClass;
152 int inSet(classSetNode *, classinfo *);
153 classSetNode *addElement(classSetNode *, classinfo *);
154 classSet *add2ClassSet(classSet *, classinfo *);
155 classSet *createClassSet();
156 int inRange(classSetNode *, classinfo *);
157 classSetNode *addClassCone(classSetNode *, classinfo *);
158 classSetNode *intersectSubtypesWithSet(classinfo *, classSetNode *);
159 int sizeOfSet(classSetNode *s);
160 int setSize(classSetNode *);
161 int printSet(classSetNode *);
162 int printClassSet(classSet *);
168 * These are local overrides for various environment variables in Emacs.
169 * Please do not remove this and leave it at the end of the file, where
170 * Emacs will automagically detect them.
171 * ---------------------------------------------------------------------
174 * indent-tabs-mode: t