typeinfo.h: rewrote some macros as functions
[cacao.git] / src / vm / jit / verify / typeinfo.h
1 /* typeinfo.h - type system used by the type checker
2
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
7
8    This file is part of CACAO.
9
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.
14
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.
19
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
23    02111-1307, USA.
24
25    Contact: cacao@complang.tuwien.ac.at
26
27    Authors: Edwin Steiner
28
29    $Id: typeinfo.h 3642 2005-11-08 19:01:17Z edwin $
30
31 */
32
33 #ifndef _TYPEINFO_H
34 #define _TYPEINFO_H
35
36 #include "vm/global.h"
37 #include "vm/references.h"
38
39 /* configuration **************************************************************/
40
41 /*
42  * TYPECHECK_STATISTICS activates gathering statistical information.
43  * TYPEINFO_DEBUG activates debug checks and debug helpers in typeinfo.c
44  * TYPECHECK_DEBUG activates debug checks in typecheck.c
45  * TYPEINFO_DEBUG_TEST activates the typeinfo test at startup.
46  * TYPECHECK_VERBOSE_IMPORTANT activates important debug messages
47  * TYPECHECK_VERBOSE activates all debug messages
48  * TYPEINFO_VERBOSE activates debug prints in typeinfo.c
49  */
50 #ifdef CACAO_TYPECHECK
51 #ifndef NDEBUG
52 /*#define TYPECHECK_STATISTICS*/
53 #define TYPEINFO_DEBUG
54 /*#define TYPEINFO_VERBOSE*/
55 #define TYPECHECK_DEBUG
56 /*#define TYPEINFO_DEBUG_TEST*/
57 /*#define TYPECHECK_VERBOSE*/
58 /*#define TYPECHECK_VERBOSE_IMPORTANT*/
59 #if defined(TYPECHECK_VERBOSE) || defined(TYPECHECK_VERBOSE_IMPORTANT)
60 #define TYPECHECK_VERBOSE_OPT
61 #endif
62 #endif
63 #endif
64
65 #ifdef TYPECHECK_VERBOSE_OPT
66 extern bool typecheckverbose;
67 #endif
68
69 /* resolve typedef cycles *****************************************************/
70
71 typedef struct typeinfo typeinfo;
72 typedef struct typeinfo_mergedlist typeinfo_mergedlist;
73 typedef struct typedescriptor typedescriptor;
74 typedef struct typevector typevector;
75 typedef struct typeinfo_retaddr_set typeinfo_retaddr_set;
76
77 /* types **********************************************************************/
78
79 /* typecheck_result - return type for boolean and tristate  functions     */
80 /*                    which may also throw exceptions (typecheck_FAIL).   */
81
82 /* NOTE: Use the enum values, not the uppercase #define macros!          */
83 #define TYPECHECK_MAYBE  0x02
84 #define TYPECHECK_FAIL   0x04
85
86 typedef enum {
87         typecheck_FALSE = false,
88         typecheck_TRUE  = true,
89         typecheck_MAYBE = TYPECHECK_MAYBE,
90         typecheck_FAIL  = TYPECHECK_FAIL
91 } typecheck_result;
92
93 /* check that typecheck_MAYBE is not ambiguous */
94 #if TYPECHECK_MAYBE == true
95 #error "`typecheck_MAYBE` must not be the same as `true`"
96 #endif
97 #if TYPECHECK_MAYBE == false
98 #error "`typecheck_MAYBE` must not be the same as `false`"
99 #endif
100
101 /* check that typecheck_FAIL is not ambiguous */
102 #if (true & TYPECHECK_FAIL) != 0
103 #error "`true` must not have bit 0x02 set (conflicts with typecheck_FAIL)"
104 #endif
105
106 /* data structures for the type system ****************************************/
107
108 /* The typeinfo structure stores detailed information on address types.
109  * (stack elements, variables, etc. with type == TYPE_ADR.)
110  *
111  * There are two kinds of address types which can be distinguished by
112  * the value of the typeclass field:
113  *
114  * 1) typeclass == NULL: returnAddress type
115  *                       use TYPEINFO_IS_PRIMITIVE to test for this
116  *
117  * 2) typeclass != NULL: reference type
118  *                       use TYPEINFO_IS_REFERENCE to test for this
119  *
120  * Note: For non-address types either there is no typeinfo allocated
121  * or the fields of the typeinfo struct contain undefined values!
122  * DO NOT access the typeinfo for non-address types!
123  *
124  * CAUTION: The typeinfo structure should be considered opaque outside of
125  *          typeinfo.[ch]. Please use the macros and functions defined here to
126  *          access typeinfo structures!
127  */
128
129 /* At all times *exactly one* of the following conditions is true for
130  * a particular typeinfo struct:
131  *
132  * A) typeclass == NULL
133  *
134  *        This is a returnAddress type. The interpretation of the
135  *        elementclass field depends on wether this typeinfo describes
136  *        a stack slot or a local variable:
137  *
138  *        stack slot: elementclass is a pointer to a
139  *            typeinfo_retaddr_set which contains a return target for
140  *            every vector in the current set of local variable vectors.
141  *            See typeinfo_retaddr_set and typevector below.
142  *
143  *        local variable: elementclass is the return target (when cast
144  *            to basicblock *)
145  *
146  *        Use TYPEINFO_IS_PRIMITIVE to check for this.
147  *        Use TYPEINFO_RETURNADDRESS to access the pointer in elementclass.
148  *        Don't access other fields of the struct.
149  *
150  * B) typeclass == pseudo_class_Null
151  *
152  *        This is the null-reference type. 
153  *        Use TYPEINFO_IS_NULLTYPE to check for this.
154  *        Don't access other fields of the struct.
155  *
156  * C) typeclass == pseudo_class_New
157  *
158  *        This is an 'uninitialized object' type. elementclass can be
159  *        cast to instruction* and points to the NEW instruction
160  *        responsible for creating this type.
161  *
162  *        Use TYPEINFO_NEWOBJECT_INSTRUCTION to access the pointer in
163  *        elementclass.
164  *        Don't access other fields of the struct.
165  *
166  * D) typeclass == pseudo_class_Arraystub
167  *
168  *        This type is used to represent the result of merging array types
169  *        with incompatible component types. An arraystub allows no access
170  *        to its components (since their type is undefined), but it allows
171  *        operations which act directly on an arbitrary array type (such as
172  *        requesting the array size).
173  *
174  *        NOTE: An array stub does *not* count as an array. It has dimension
175  *              zero.
176  *
177  *        Otherwise like a normal class reference type.
178  *        Don't access other fields of the struct.
179  *
180  * E) typeclass is an array class
181  *
182  *        An array reference.
183  *            elementclass...typeclass of the element type
184  *            dimension......dimension of the array (>=1)
185  *            elementtype....element type (ARRAYTYPE_...)
186  *            merged.........mergedlist of the element type
187  *
188  *        Use TYPEINFO_IS_ARRAY to check for this case.
189  *
190  *        The elementclass may be one of the following:
191  *        1) pseudo_class_Arraystub
192  *        2) an unresolved type
193  *        3) a loaded interface
194  *        4) a loaded (non-pseudo-,non-array-)class != (BOOTSTRAP)java.lang.Object
195  *                Note: `merged` may be used
196  *        5) (BOOTSTRAP)java.lang.Object
197  *                Note: `merged` may be used
198  *
199  *        For the semantics of the merged field in cases 4) and 5) consult the 
200  *        corresponding descriptions with `elementclass` replaced by `typeclass`.
201  *
202  * F) typeclass is an unresolved type (a symbolic class/interface reference)
203  *
204  *        The type has not been resolved yet. (Meaning it corresponds to an
205  *        unloaded class or interface).
206  *        Don't access other fields of the struct.
207  *
208  * G) typeclass is a loaded interface
209  *
210  *        An interface reference type.
211  *        Don't access other fields of the struct.
212  *
213  * H) typeclass is a loaded (non-pseudo-,non-array-)class != (BOOTSTRAP)java.lang.Object
214  *
215  *        A loaded class type.
216  *        All classref_or_classinfos in u.merged.list (if any) are
217  *        loaded subclasses of typeclass (no interfaces, array classes, or
218  *        unresolved types).
219  *        Don't access other fields of the struct.
220  *
221  * I) typeclass is (BOOTSTRAP)java.lang.Object
222  *
223  *        The most general kind of reference type.
224  *        In this case u.merged.count and u.merged.list
225  *        are valid and may be non-zero.
226  *        The classref_or_classinfos in u.merged.list (if any) may be
227  *        classes, interfaces, pseudo classes or unresolved types.
228  *        Don't access other fields of the struct.
229  */
230
231 /* The following algorithm is used to determine if the type described
232  * by this typeinfo struct supports the interface X:  * XXX add MAYBE *
233  *
234  *     1) If typeclass is X or a subinterface of X the answer is "yes".
235  *     2) If typeclass is a (pseudo) class implementing X the answer is "yes".
236  *     3) If typeclass is not an array and u.merged.count>0
237  *        and all classes/interfaces in u.merged.list implement X
238  *        the answer is "yes".
239  *     4) If none of the above is true the answer is "no".
240  */
241
242 /*
243  * CAUTION: The typeinfo structure should be considered opaque outside of
244  *          typeinfo.[ch]. Please use the macros and functions defined here to
245  *          access typeinfo structures!
246  */
247 struct typeinfo {
248         classref_or_classinfo  typeclass;
249         classref_or_classinfo  elementclass; /* valid if dimension>0 */ /* various uses! */
250         typeinfo_mergedlist   *merged;
251         u1                     dimension;
252         u1                     elementtype;  /* valid if dimension>0           */
253 };
254
255 struct typeinfo_mergedlist {
256         s4                    count;
257         classref_or_classinfo list[1];       /* variable length!                        */
258 };
259
260 /*-----------------------------------------------------------------------*/
261 /* a typeinfo_retaddr_set stores the set of possible returnAddresses     */
262 /* that may be in a particular stack slot at a particular point in the   */
263 /* program.                                                              */
264 /*                                                                       */
265 /* There may be one or more alternative returnAddresses if the           */
266 /* instruction can be reached via one or more JSR jumps (among other     */
267 /* control-flow paths                                                    */
268 /*-----------------------------------------------------------------------*/
269
270 struct typeinfo_retaddr_set {
271         typeinfo_retaddr_set *alt;  /* next alternative in set               */
272         void                 *addr; /* return address                        */
273 };
274
275 /* a type descriptor stores a basic type and the typeinfo                */
276 /* this is used for storing the type of a local variable, and for        */
277 /* storing types in the signature of a method                            */
278
279 struct typedescriptor {
280         typeinfo        info;     /* valid if type == TYPE_ADR               */
281         u1              type;     /* basic type (TYPE_INT, ...)              */
282 };
283
284 /*-----------------------------------------------------------------------*/
285 /* typevectors are used to store the types of all local variables        */
286 /* at a given point in the program.                                      */
287 /*                                                                       */
288 /* There may be more than one possible typevector for the local          */
289 /* variables at a given instruction if the instruction can be reached    */
290 /* via one or more JSR jumps (among other control-flow paths).           */
291 /*                                                                       */
292 /* This is called the set of alternative type vectors at that            */
293 /* particular point in the program.                                      */
294 /*-----------------------------------------------------------------------*/
295
296 struct typevector {
297         typevector      *alt;     /* next alternative in typevector set      */
298         int              k;       /* for lining up with the stack set        */
299         typedescriptor   td[1];   /* types of locals, variable length!       */
300 };
301
302 /****************************************************************************/
303 /* MACROS                                                                   */
304 /****************************************************************************/
305
306 /* NOTE: The TYPEINFO macros take typeinfo *structs*, not pointers as
307  *       arguments.  You have to dereference any pointers.
308  */
309
310 /* typevectors **************************************************************/
311
312 #define TYPEVECTOR_SIZE(size)                                           \
313     ((sizeof(typevector) - sizeof(typedescriptor))      \
314      + (size)*sizeof(typedescriptor))
315
316 #define DNEW_TYPEVECTOR(size)                                           \
317     ((typevector*)dump_alloc(TYPEVECTOR_SIZE(size)))
318
319 #define DMNEW_TYPEVECTOR(num,size)                                              \
320     ((void*)dump_alloc((num) * TYPEVECTOR_SIZE(size)))
321
322 #define MGET_TYPEVECTOR(array,index,size) \
323     ((typevector*) (((u1*)(array)) + TYPEVECTOR_SIZE(size) * (index)))
324
325 /* internally used macros ***************************************************/
326
327 /* internal, don't use this explicitly! */
328 #define TYPEINFO_ALLOCMERGED(mergedlist,count)                  \
329     do {(mergedlist) = (typeinfo_mergedlist*)dump_alloc(        \
330             sizeof(typeinfo_mergedlist)                         \
331             + ((count)-1)*sizeof(classinfo*));} while(0)
332
333 /* internal, don't use this explicitly! */
334 #define TYPEINFO_FREEMERGED(mergedlist)
335
336 /* internal, don't use this explicitly! */
337 #define TYPEINFO_FREEMERGED_IF_ANY(mergedlist)
338
339 /* macros for type queries **************************************************/
340
341 #define TYPEINFO_IS_PRIMITIVE(info)                             \
342             ((info).typeclass.any == NULL)
343
344 #define TYPEINFO_IS_REFERENCE(info)                             \
345             ((info).typeclass.any != NULL)
346
347 #define TYPEINFO_IS_NULLTYPE(info)                              \
348             ((info).typeclass.cls == pseudo_class_Null)
349
350 #define TYPEINFO_IS_NEWOBJECT(info)                             \
351             ((info).typeclass.cls == pseudo_class_New)
352
353 #define TYPEINFO_IS_JAVA_LANG_CLASS(info)                       \
354             ((info).typeclass.cls == class_java_lang_Class)
355
356 /* only use this if TYPEINFO_IS_PRIMITIVE returned true! */
357 #define TYPEINFO_RETURNADDRESS(info)                            \
358             ((info).elementclass.any)
359
360 /* only use this if TYPEINFO_IS_NEWOBJECT returned true! */
361 #define TYPEINFO_NEWOBJECT_INSTRUCTION(info)                    \
362                 ((info).elementclass.any)
363
364 /* only use this if TYPEINFO_IS_JAVA_LANG_CLASS returned true! */
365 #define TYPEINFO_JAVA_LANG_CLASS_CLASSREF(info)                 \
366                 ((info).elementclass.ref)
367
368 /* macros for array type queries ********************************************/
369
370 #define TYPEINFO_IS_ARRAY(info)                                 \
371             ( TYPEINFO_IS_REFERENCE(info)                       \
372               && ((info).dimension != 0) )
373
374 #define TYPEINFO_IS_SIMPLE_ARRAY(info)                          \
375             ( ((info).dimension == 1) )
376
377 #define TYPEINFO_IS_ARRAY_ARRAY(info)                           \
378             ( ((info).dimension >= 2) )
379
380 #define TYPEINFO_IS_PRIMITIVE_ARRAY(info,arraytype)             \
381             ( TYPEINFO_IS_SIMPLE_ARRAY(info)                    \
382               && ((info).elementtype == (arraytype)) )
383
384 #define TYPEINFO_IS_OBJECT_ARRAY(info)                          \
385             ( TYPEINFO_IS_SIMPLE_ARRAY(info)                    \
386               && ((info).elementclass.any != NULL) )
387
388 /* assumes that info describes an array type */
389 #define TYPEINFO_IS_ARRAY_OF_REFS_NOCHECK(info)                 \
390             ( ((info).elementclass.any != NULL)                 \
391               || ((info).dimension >= 2) )
392
393 #define TYPEINFO_IS_ARRAY_OF_REFS(info)                         \
394             ( TYPEINFO_IS_ARRAY(info)                           \
395               && TYPEINFO_IS_ARRAY_OF_REFS_NOCHECK(info) )
396
397 #define TYPE_IS_RETURNADDRESS(type,info)                        \
398             ( ((type)==TYPE_ADDRESS)                            \
399               && TYPEINFO_IS_PRIMITIVE(info) )
400
401 #define TYPE_IS_REFERENCE(type,info)                            \
402             ( ((type)==TYPE_ADDRESS)                            \
403               && !TYPEINFO_IS_PRIMITIVE(info) )
404
405 #define TYPEDESC_IS_RETURNADDRESS(td)                           \
406             TYPE_IS_RETURNADDRESS((td).type,(td).info)
407
408 #define TYPEDESC_IS_REFERENCE(td)                               \
409             TYPE_IS_REFERENCE((td).type,(td).info)
410
411 /* queries allowing the null type ********************************************/
412
413 #define TYPEINFO_MAYBE_ARRAY(info)                              \
414     (TYPEINFO_IS_ARRAY(info) || TYPEINFO_IS_NULLTYPE(info))
415
416 #define TYPEINFO_MAYBE_PRIMITIVE_ARRAY(info,at)                 \
417     (TYPEINFO_IS_PRIMITIVE_ARRAY(info,at) || TYPEINFO_IS_NULLTYPE(info))
418
419 #define TYPEINFO_MAYBE_ARRAY_OF_REFS(info)                      \
420     (TYPEINFO_IS_ARRAY_OF_REFS(info) || TYPEINFO_IS_NULLTYPE(info))
421
422 /* macros for initializing typeinfo structures ******************************/
423
424 #define TYPEINFO_INIT_PRIMITIVE(info)                           \
425          do {(info).typeclass.any = NULL;                       \
426              (info).elementclass.any = NULL;                    \
427              (info).merged = NULL;                              \
428              (info).dimension = 0;                              \
429              (info).elementtype = 0;} while(0)
430
431 #define TYPEINFO_INIT_RETURNADDRESS(info,adr)                   \
432          do {(info).typeclass.any = NULL;                       \
433              (info).elementclass.any = (adr);                   \
434              (info).merged = NULL;                              \
435              (info).dimension = 0;                              \
436              (info).elementtype = 0;} while(0)
437
438 #define TYPEINFO_INIT_NON_ARRAY_CLASSINFO(info,cinfo)   \
439          do {(info).typeclass.cls = (cinfo);            \
440              (info).elementclass.any = NULL;            \
441              (info).merged = NULL;                      \
442              (info).dimension = 0;                      \
443              (info).elementtype = 0;} while(0)
444
445 #define TYPEINFO_INIT_JAVA_LANG_CLASS(info,cr)                  \
446          do {(info).typeclass.any = class_java_lang_Class;      \
447              (info).elementclass.ref = (cr);                    \
448              (info).merged = NULL;                              \
449              (info).dimension = 0;                              \
450              (info).elementtype = 0;} while(0)
451
452 #define TYPEINFO_INIT_NULLTYPE(info)                            \
453             TYPEINFO_INIT_NON_ARRAY_CLASSINFO(info,pseudo_class_Null)
454
455 #define TYPEINFO_INIT_NEWOBJECT(info,instr)             \
456          do {(info).typeclass.cls = pseudo_class_New;   \
457              (info).elementclass.any = (instr);         \
458              (info).merged = NULL;                      \
459              (info).dimension = 0;                      \
460              (info).elementtype = 0;} while(0)
461
462 #define TYPEINFO_INIT_PRIMITIVE_ARRAY(info,arraytype)                   \
463     typeinfo_init_classinfo(&(info),primitivetype_table[arraytype].arrayclass);
464
465 /* macros for copying types (destinition is not checked or freed) ***********/
466
467 /* TYPEINFO_COPY makes a shallow copy, the merged pointer is simply copied. */
468 #define TYPEINFO_COPY(src,dst)                                  \
469     do {(dst) = (src);} while(0)
470
471 /* TYPEINFO_CLONE makes a deep copy, the merged list (if any) is duplicated
472  * into a newly allocated array.
473  */
474 #define TYPEINFO_CLONE(src,dst)                                 \
475     do {(dst) = (src);                                          \
476         if ((dst).merged) typeinfo_clone(&(src),&(dst));} while(0)
477
478 /****************************************************************************/
479 /* FUNCTIONS                                                                */
480 /****************************************************************************/
481
482 /* typevector functions *****************************************************/
483
484 /* element read-only access */
485 bool typevectorset_checktype(typevector *set,int index,int type);
486 bool typevectorset_checkreference(typevector *set,int index);
487 bool typevectorset_checkretaddr(typevector *set,int index);
488 int typevectorset_copymergedtype(methodinfo *m,typevector *set,int index,typeinfo *dst);
489 int typevectorset_mergedtype(methodinfo *m,typevector *set,int index,typeinfo *temp,typeinfo **result);
490
491 /* element write access */
492 void typevectorset_store(typevector *set,int index,int type,typeinfo *info);
493 void typevectorset_store_retaddr(typevector *set,int index,typeinfo *info);
494 void typevectorset_store_twoword(typevector *set,int index,int type);
495 bool typevectorset_init_object(typevector *set,void *ins,classref_or_classinfo initclass,int size);
496
497 /* vector functions */
498 bool typevector_separable_from(typevector *a,typevector *b,int size);
499 typecheck_result typevector_merge(methodinfo *m,typevector *dst,typevector *y,int size);
500
501 /* vector set functions */
502 typevector *typevectorset_copy(typevector *src,int k,int size);
503 void typevectorset_copy_inplace(typevector *src,typevector *dst,int size);
504 bool typevectorset_separable_with(typevector *set,typevector *add,int size);
505 typecheck_result typevectorset_collapse(methodinfo *m,typevector *dst,int size);
506 void typevectorset_add(typevector *dst,typevector *v,int size);
507 typevector *typevectorset_select(typevector **set,int retindex,void *retaddr);
508
509 /* inquiry functions (read-only) ********************************************/
510
511 bool typeinfo_is_array(typeinfo *info);
512 bool typeinfo_is_primitive_array(typeinfo *info,int arraytype);
513 bool typeinfo_is_array_of_refs(typeinfo *info);
514
515 typecheck_result typeinfo_is_assignable(typeinfo *value,typeinfo *dest);
516 typecheck_result typeinfo_is_assignable_to_class(typeinfo *value,classref_or_classinfo dest);
517
518 /* initialization functions *************************************************/
519
520 /* RETURN VALUE (bool):
521  *     true.............ok,
522  *     false............an exception has been thrown.
523  *
524  * RETURN VALUE (int):
525  *     >= 0.............ok,
526  *     -1...............an exception has been thrown.
527  */
528 void typeinfo_init_classinfo(typeinfo *info,classinfo *c);
529 bool typeinfo_init_class(typeinfo *info,classref_or_classinfo c);
530 bool typeinfo_init_component(typeinfo *srcarray,typeinfo *dst);
531
532 bool typeinfo_init_from_typedesc(typedesc *desc,u1 *type,typeinfo *info);
533 bool typeinfos_init_from_methoddesc(methoddesc *desc,u1 *typebuf,
534                                    typeinfo *infobuf,
535                                    int buflen,bool twoword,
536                                    u1 *returntype,typeinfo *returntypeinfo);
537 bool  typedescriptor_init_from_typedesc(typedescriptor *td,
538                                                                             typedesc *desc);
539 int  typedescriptors_init_from_methoddesc(typedescriptor *td,
540                                                                                   methoddesc *desc,
541                                                                                   int buflen,bool twoword,int startindex,
542                                                                                   typedescriptor *returntype);
543
544 void typeinfo_clone(typeinfo *src,typeinfo *dest);
545
546 /* freeing memory ***********************************************************/
547
548 void typeinfo_free(typeinfo *info);
549
550 /* functions for merging types **********************************************/
551
552 typecheck_result typeinfo_merge(methodinfo *m,typeinfo *dest,typeinfo* y);
553
554 /* debugging helpers ********************************************************/
555
556 #ifdef TYPEINFO_DEBUG
557
558 #include <stdio.h>
559
560 void typeinfo_test();
561 void typeinfo_print_class(FILE *file,classref_or_classinfo c);
562 void typeinfo_print(FILE *file,typeinfo *info,int indent);
563 void typeinfo_print_short(FILE *file,typeinfo *info);
564 void typeinfo_print_type(FILE *file,int type,typeinfo *info);
565 void typeinfo_print_stacktype(FILE *file,int type,typeinfo *info);
566 void typedescriptor_print(FILE *file,typedescriptor *td);
567 void typevector_print(FILE *file,typevector *vec,int size);
568 void typevectorset_print(FILE *file,typevector *set,int size);
569
570 #endif /* TYPEINFO_DEBUG */
571
572 #endif /* _TYPEINFO_H */
573
574
575 /*
576  * These are local overrides for various environment variables in Emacs.
577  * Please do not remove this and leave it at the end of the file, where
578  * Emacs will automagically detect them.
579  * ---------------------------------------------------------------------
580  * Local variables:
581  * mode: c
582  * indent-tabs-mode: t
583  * c-basic-offset: 4
584  * tab-width: 4
585  * End:
586  */