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