Added Makefile.in (as generated by automake) to narray and doc to allow flawless...
[cacao.git] / tables.h
1 /****************************** tables.h ***************************************
2
3         Copyright (c) 1997 A. Krall, R. Grafl, M. Gschwind, M. Probst
4
5         See file COPYRIGHT for information on usage and disclaimer of warranties
6
7         Author:  Reinhard Grafl      EMAIL: cacao@complang.tuwien.ac.at
8
9         Last Change: 1996/11/20
10
11 *******************************************************************************/
12
13 #include "global.h" /* for unicode. -- phil */
14
15 #define CLASS(name)     (unicode_getclasslink(unicode_new_char(name)))
16
17 /* to determine the end of utf strings */
18 #define utf_end(utf) ((char *) utf->text+utf->blength)
19
20 /* switches for debug messages */
21 extern bool collectverbose;
22 extern list unloadedclasses;
23
24 /* function for disposing javastrings */
25 typedef void (*stringdeleter) ( java_objectheader *string );
26     
27 /* creates hashtables for symboltables */
28 void tables_init ();
29
30 /* free memory for hashtables */ 
31 void tables_close (stringdeleter del);
32
33 /* write utf symbol to file/buffer */
34 void utf_sprint (char *buffer, utf *u);
35 void utf_fprint (FILE *file, utf *u);
36 void utf_display (utf *u);
37
38 /* create new utf-symbol */
39 utf *utf_new (char *text, u2 length);
40 utf *utf_new_char (char *text);
41
42 /* show utf-table */
43 void utf_show ();
44
45 /* get next unicode character of a utf-string */
46 u2 utf_nextu2(char **utf);
47
48 /* get number of unicode characters of a utf string */
49 u4 utf_strlen(utf *u);
50
51 /* search for class and create it if not found */
52 classinfo *class_new (utf *u);
53
54 /* get javatype according to a typedescriptor */
55 u2 desc_to_type (utf *descriptor);
56
57 /* get length of a datatype */
58 u2 desc_typesize (utf *descriptor);
59
60 /* determine hashkey of a unicode-symbol */
61 u4 unicode_hashkey (u2 *text, u2 length);
62
63 /* create hashtable */
64 void init_hashtable(hashtable *hash, u4 size);
65
66 /* search for class in classtable */
67 classinfo *class_get (utf *u);
68
69
70 void heap_init (u4 size, u4 startsize, void **stackbottom);
71 void heap_close ();
72 void *heap_allocate (u4 bytelength, bool references, methodinfo *finalizer);
73 void heap_addreference (void **reflocation);
74
75 void gc_init (void);
76 void gc_thread (void);
77 void gc_call (void);
78
79
80
81
82