80f789328662b205b4a2b169feb54672d6586ac2
[cacao.git] / src / vm / 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 extern bool collectverbose;
14
15
16 #define CLASS(name)     (unicode_getclasslink(unicode_new_char(name)))
17
18 typedef void (*stringdeleter) ( java_objectheader *string );
19
20
21 void suck_init (char *classpath);
22 bool suck_start (unicode *name);
23 void suck_stop ();
24 void suck_nbytes (u1 *buffer, u4 len);
25 void skip_nbytes (u4 len);
26 u1 suck_u1 ();
27 s1 suck_s1 ();
28 u2 suck_u2 ();
29 s2 suck_s2 ();
30 u4 suck_u4 ();
31 s4 suck_s4 ();
32 u8 suck_u8 ();
33 s8 suck_s8 ();
34 float suck_float ();
35 double suck_double ();
36
37
38 void unicode_init ();
39 void unicode_close (stringdeleter del);
40 void unicode_display (unicode *u);
41 void unicode_sprint (char *buffer, unicode *u);
42 void unicode_fprint (FILE *file, unicode *u);
43 unicode *unicode_new_u2 (u2 *text, u2 length);
44 unicode *unicode_new_char (char *text);
45 void unicode_setclasslink (unicode *u, classinfo *class);
46 classinfo *unicode_getclasslink (unicode *u);
47 void unicode_unlinkclass (unicode *u);
48 void unicode_setstringlink (unicode *u, java_objectheader *str);
49 void unicode_unlinkstring (unicode *u);
50 void unicode_show ();
51
52 u2 desc_to_type (unicode *descriptor);
53 u2 desc_typesize (unicode *descriptor);
54
55
56 void heap_init (u4 size, u4 startsize, void **stackbottom);
57 void heap_close ();
58 void *heap_allocate (u4 bytelength, bool references, methodinfo *finalizer);
59 void heap_addreference (void **reflocation);
60
61 void gc_init (void);
62 void gc_thread (void);
63 void gc_call (void);