*** empty log message ***
[cacao.git] / global.h
1 /* global.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         Contains global definitions which are used in the whole program, includes
8         some files and contains global used macros.
9
10         Authors: Reinhard Grafl              EMAIL: cacao@complang.tuwien.ac.at
11                  Andreas  Krall   (andi)     EMAIL: cacao@complang.tuwien.ac.at
12         Changes: Mark     Probst  (schani)   EMAIL: cacao@complang.tuwien.ac.at
13                          Philipp  Tomsich (phil)     EMAIL: cacao@complang.tuwien.ac.at
14
15         Last Change: $Id: global.h 548 2003-11-01 19:46:25Z twisti $
16
17 *******************************************************************************/
18
19 #ifndef __global_h_
20 #define __global_h_
21
22 #include "config.h"
23
24 #define _GNU_SOURCE
25
26 #define STATISTICS          /* if enabled collects program statistics         */
27
28 /* 
29  * SIZE_FROM_CLASSINFO toggles between the bitmap_based and the new method 
30  * of determining the sizes of objects on the heap.
31  */
32 #define SIZE_FROM_CLASSINFO
33
34 /* standard includes **********************************************************/
35
36 #include <stdio.h>
37 #include <stdlib.h>
38 #include <string.h>
39 #include <time.h>
40
41 #include "toolbox/memory.h"
42 #include "toolbox/chain.h"
43 #include "toolbox/list.h"
44 #include "toolbox/loging.h"
45
46 /* system dependent types *****************************************************/
47
48 #include "types.h"
49
50
51 /* additional data types ******************************************************/
52
53 typedef void *voidptr;          /* generic pointer */
54
55 typedef int   bool;             /* boolean data type */
56
57 #define true  1
58 #define false 0
59
60 #define PRIMITIVETYPE_COUNT  9  /* number of primitive types */
61
62 typedef void (*functionptr) (); /* generic function pointer */
63
64
65 #define MAX_ALIGN 8             /* most generic alignment for JavaVM values   */
66
67 /* shutdown function **********************************************************/
68
69 void cacao_shutdown(s4 status);
70
71
72 /* basic data types ***********************************************************/
73
74 #define TYPE_INT      0         /* the JavaVM types must numbered in the      */
75 #define TYPE_LONG     1         /* same order as the ICMD_Ixxx to ICMD_Axxx   */
76 #define TYPE_FLOAT    2         /* instructions (LOAD and STORE)              */
77 #define TYPE_DOUBLE   3         /* integer, long, float, double, address      */
78 #define TYPE_ADDRESS  4         /* all other types can be numbered arbitrarly */
79
80 #define TYPE_VOID    10
81
82
83 /* Java class file constants **************************************************/
84
85 #define MAGIC         0xcafebabe
86 #define MINOR_VERSION 3
87 #define MAJOR_VERSION 45
88
89 #define CONSTANT_Class                 7
90 #define CONSTANT_Fieldref              9
91 #define CONSTANT_Methodref            10
92 #define CONSTANT_InterfaceMethodref   11
93 #define CONSTANT_String                8
94 #define CONSTANT_Integer               3
95 #define CONSTANT_Float                 4
96 #define CONSTANT_Long                  5
97 #define CONSTANT_Double                6
98 #define CONSTANT_NameAndType          12
99 #define CONSTANT_Utf8                  1
100
101 #define CONSTANT_Arraydescriptor      13
102 #define CONSTANT_UNUSED                0
103
104 #define ACC_PUBLIC                0x0001
105 #define ACC_PRIVATE               0x0002
106 #define ACC_PROTECTED             0x0004
107 #define ACC_STATIC                0x0008
108 #define ACC_FINAL                 0x0010
109 #define ACC_SYNCHRONIZED          0x0020
110 #define ACC_VOLATILE              0x0040
111 #define ACC_TRANSIENT             0x0080
112 #define ACC_NATIVE                0x0100
113 #define ACC_INTERFACE             0x0200
114 #define ACC_ABSTRACT              0x0400
115
116
117 /* resolve typedef cycles *****************************************************/
118
119 typedef struct utf utf;
120 typedef struct literalstring literalstring;
121 typedef struct java_objectheader java_objectheader; 
122 typedef struct classinfo classinfo; 
123 typedef struct vftbl vftbl;
124 typedef u1* methodptr;
125 typedef struct fieldinfo  fieldinfo; 
126 typedef struct methodinfo methodinfo; 
127
128
129 /* constant pool entries *******************************************************
130
131         All constant pool entries need a data structure which contain the entrys
132         value. In some cases this structure exist already, in the remaining cases
133         this structure must be generated:
134
135                 kind                      structure                     generated?
136         ----------------------------------------------------------------------
137     CONSTANT_Class               classinfo                           no
138     CONSTANT_Fieldref            constant_FMIref                    yes
139     CONSTANT_Methodref           constant_FMIref                    yes
140     CONSTANT_InterfaceMethodref  constant_FMIref                    yes
141     CONSTANT_String              unicode                             no
142     CONSTANT_Integer             constant_integer                   yes
143     CONSTANT_Float               constant_float                     yes
144     CONSTANT_Long                constant_long                      yes
145     CONSTANT_Double              constant_double                    yes
146     CONSTANT_NameAndType         constant_nameandtype               yes
147     CONSTANT_Utf8                unicode                             no
148     CONSTANT_Arraydescriptor     constant_arraydescriptor           yes
149     CONSTANT_UNUSED              -
150
151 *******************************************************************************/
152
153 /* data structures for hashtables ********************************************
154
155
156         All utf-symbols, javastrings and classes are stored in global hashtables,
157         so every symbol exists only once. Equal symbols have identical pointers.
158         The functions for adding hashtable elements search the table for the 
159         element with the specified name/text and return it on success. Otherwise a 
160         new hashtable element is created.
161
162     The hashtables use external linking for handling collisions. The hashtable 
163         structure contains a pointer <ptr> to the array of hashtable slots. The 
164         number of hashtable slots and therefore the size of this array is specified 
165         by the element <size> of hashtable structure. <entries> contains the number
166         of all hashtable elements stored in the table, including those in the 
167         external chains.
168         The hashtable element structures (utf, literalstring, classinfo) contain
169         both a pointer to the next hashtable element as a link for the external hash 
170         chain and the key of the element. The key is computed from the text of
171         the string or the classname by using up to 8 characters.
172         
173         If the number of entries in the hashtable exceeds twice the size of the 
174         hashtableslot-array it is supposed that the average length of the 
175         external chains has reached a value beyond 2. Therefore the functions for
176         adding hashtable elements (utf_new, class_new, literalstring_new) double
177         the hashtableslot-array. In this restructuring process all elements have
178         to be inserted into the new hashtable and new external chains must be built.
179
180
181 example for the layout of a hashtable:
182
183 hashtable.ptr-->  +-------------------+
184                   |                   |
185                            ...
186                   |                   |
187                   +-------------------+   +-------------------+   +-------------------+
188                   | hashtable element |-->| hashtable element |-->| hashtable element |-->NULL
189                   +-------------------+   +-------------------+   +-------------------+
190                   | hashtable element |
191                   +-------------------+   +-------------------+   
192                   | hashtable element |-->| hashtable element |-->NULL
193                   +-------------------+   +-------------------+   
194                   | hashtable element |-->NULL
195                   +-------------------+
196                   |                   |
197                            ...
198                   |                   |
199                   +-------------------+
200
201 */
202
203
204 /* data structure for utf8 symbols ********************************************/
205
206 struct utf {
207         utf        *hashlink;       /* link for external hash chain               */
208         int         blength;        /* text length in bytes                       */           
209         char       *text;           /* pointer to text                            */
210 };
211
212 /* data structure of internal javastrings stored in global hashtable **********/
213
214 struct literalstring {
215         literalstring     *hashlink;     /* link for external hash chain          */
216         java_objectheader *string;  
217 };
218
219 /* data structure for accessing hashtables ************************************/
220
221 typedef struct {            
222   u4 size;
223   u4 entries;        /* number of entries in the table */
224   void **ptr;        /* pointer to hashtable */
225 } hashtable;
226
227 /* data structures of remaining constant pool entries *************************/
228
229 typedef struct {                /* Fieldref, Methodref and InterfaceMethodref     */
230         classinfo *class;       /* class containing this field/method/interface   */
231         utf       *name;        /* field/method/interface name                    */
232         utf       *descriptor;  /* field/method/interface type descriptor string  */
233 } constant_FMIref;
234
235 typedef struct {            /* Integer                                        */
236         s4 value;
237 } constant_integer;
238         
239 typedef struct {            /* Float                                          */
240         float value;
241 } constant_float;
242
243 typedef struct {            /* Long                                           */
244         s8 value;
245 } constant_long;
246         
247 typedef struct {            /* Double                                         */
248         double value;
249 } constant_double;
250
251 typedef struct {            /* NameAndType (Field or Method)                  */
252         utf *name;              /* field/method name                              */
253         utf *descriptor;        /* field/method type descriptor string            */
254 } constant_nameandtype;
255
256 /*  arraydescriptor describes array types. Basic array types contain their
257         type in the arraytype field, objectclass contains a class pointer for
258         arrays of objects (arraytype == ARRAYTYPE_OBJECT), elementdescriptor
259         contains a pointer to an arraydescriptor which describes the element
260         types in the case of arrays of arrays (arraytype == ARRAYTYPE_ARRAY).
261 */
262
263 typedef struct constant_arraydescriptor {
264         int arraytype;
265         classinfo *objectclass;
266         struct constant_arraydescriptor *elementdescriptor;
267 } constant_arraydescriptor;
268
269 #include "jit/sets.h"
270
271 /* data structures of the runtime system **************************************/
272
273 /* objects *********************************************************************
274
275         All objects (and arrays) which resides on the heap need the following
276         header at the beginning of the data structure.
277 */
278
279 struct java_objectheader {              /* header for all objects             */
280         vftbl *vftbl;                       /* pointer to virtual function table  */
281 };
282
283
284
285 /* arrays **********************************************************************
286
287         All arrays are objects (they need the object header with a pointer to a
288         vvftbl (array class table). There is only one class for all arrays. The
289         type of an array is stored directly in the array object. Following types
290         are defined:
291 */
292
293 #define ARRAYTYPE_INT      0
294 #define ARRAYTYPE_LONG     1
295 #define ARRAYTYPE_FLOAT    2
296 #define ARRAYTYPE_DOUBLE   3
297 #define ARRAYTYPE_BYTE     4
298 #define ARRAYTYPE_CHAR     5
299 #define ARRAYTYPE_SHORT    6
300 #define ARRAYTYPE_BOOLEAN  7
301 #define ARRAYTYPE_OBJECT   8
302 #define ARRAYTYPE_ARRAY    9
303
304 typedef struct java_arrayheader {       /* header for all arrays              */
305         java_objectheader objheader;        /* object header                      */
306         s4 size;                            /* array size                         */
307 #ifdef SIZE_FROM_CLASSINFO
308         s4 alignedsize; /* phil */
309 #endif
310         s4 arraytype;                       /* array type from previous list      */
311 } java_arrayheader;
312
313
314
315 /* structs for all kinds of arrays ********************************************/
316
317 typedef struct java_chararray {
318         java_arrayheader header;
319         u2 data[1];
320 } java_chararray;
321
322 typedef struct java_floatheader {
323         java_arrayheader header;
324         float data[1];
325 } java_floatarray;
326
327 typedef struct java_doublearray {
328         java_arrayheader header;
329         double data[1];
330 } java_doublearray;
331
332 /*  booleanarray and bytearray need identical memory layout (access methods
333     use the same machine code */
334
335 typedef struct java_booleanarray {
336         java_arrayheader header;
337         u1 data[1];
338 } java_booleanarray;
339
340 typedef struct java_bytearray {
341         java_arrayheader header;
342         s1 data[1];
343 } java_bytearray;
344
345 typedef struct java_shortarray {
346         java_arrayheader header;
347         s2 data[1];
348 } java_shortarray;
349
350 typedef struct java_intarray {
351         java_arrayheader header;
352         s4 data[1];
353 } java_intarray;
354
355 typedef struct java_longarray {
356         java_arrayheader header;
357         s8 data[1];
358 } java_longarray;
359
360 /*  objectarray and arrayarray need identical memory layout (access methods
361     use the same machine code */
362
363 typedef struct java_objectarray {
364         java_arrayheader header;
365         classinfo *elementtype;
366         java_objectheader *data[1];
367 } java_objectarray;
368
369 typedef struct java_arrayarray {
370         java_arrayheader header;
371         constant_arraydescriptor *elementdescriptor;
372         java_arrayheader *data[1];
373 } java_arrayarray;
374
375
376 /* structure for primitive classes ********************************************/
377
378 typedef struct primitivetypeinfo {
379         classinfo *class_wrap;               /* class for wrapping primitive type */
380         classinfo *class_primitive;          /* primitive class                   */
381         char *wrapname;                      /* name of class for wrapping        */
382         char typesig;                        /* one character type signature      */
383         char *name;                          /* name of primitive class           */
384 } primitivetypeinfo;
385
386 /* field, method and class structures *****************************************/
387
388 typedef struct xtafldinfo {
389                 bool       fieldChecked;                
390                 classinfo *fldClassType;
391                 classSet  *XTAclassSet;      /* field class type set                  */  
392                 } xtafldinfo;
393 /* fieldinfo ******************************************************************/
394
395 struct fieldinfo {            /* field of a class                                 */
396         s4       flags;       /* ACC flags                                        */
397         s4       type;        /* basic data type                                  */
398         utf *name;            /* name of field                                    */
399         utf *descriptor;      /* JavaVM descriptor string of field                */
400         
401         s4       offset;      /* offset from start of object (instance variables) */
402
403         union {               /* storage for static values (class variables)      */
404                 s4 i; 
405                 s8 l;
406                 float f;
407                 double d;
408                 void *a; 
409         } value;
410         
411         xtafldinfo *xta;
412
413 } ;
414
415 struct basicblock;
416
417 /* exceptiontable *************************************************************/
418
419 typedef struct xtable { /* exceptiontable entry in a method           */ 
420         s4         startpc;         /* start pc of guarded area (inclusive)       */
421         struct basicblock *start;
422
423         s4         endpc;           /* end pc of guarded area (exklusive)         */
424         struct basicblock *end;
425
426         s4         handlerpc;       /* pc of exception handler                    */
427         struct basicblock *handler;
428
429         classinfo *catchtype;       /* catchtype of exception (NULL == catchall)  */
430         struct xtable *next;        /* used to build a list of exception when     */
431                                     /* loops are copied */
432         struct xtable *down;        /* instead of the old array, a list is used   */
433 } xtable;
434
435
436 typedef struct exceptiontable { /* exceptiontable entry in a method           */ 
437         s4         startpc;         /* start pc of guarded area (inclusive)       */
438         s4         endpc;           /* end pc of guarded area (exklusive)         */
439         s4         handlerpc;       /* pc of exception handler                    */
440         classinfo *catchtype;       /* catchtype of exception (NULL == catchall)  */
441 } exceptiontable;
442
443
444 /* methodinfo  static info ****************************************************/
445 typedef struct xtainfo {
446         s4              XTAmethodUsed;  /* XTA if used in callgraph -    not used /used */
447         classSet        *XTAclassSet;      /* method class type set                 */ 
448         /*classSet      *PartClassSet */   /* method class type set                 */ 
449
450         classSetNode    *paramClassSet;     /* cone set of methods parameters       */
451
452         methSet         *calls;            /* methods this method calls             */ 
453         methSet         *calledBy;         /* methods that call this method         */ 
454         methSet         *marked;           /* methods that marked by this method    */ 
455         /*methSet         *markedBy*/
456         fldSet          *fldsUsed;         /* fields used by this method             */ 
457         /*methSetNode  *interfaceCalls*/   /* methods this method calls as interface */ 
458         bool             chgdSinceLastParse; /* Changed since last parse ?          */
459 } xtainfo; 
460
461 /* methodinfo *****************************************************************/
462
463 struct methodinfo {                 /* method structure                       */
464         s4             flags;               /* ACC flags                              */
465         utf       *name;                /* name of method                         */
466         utf       *descriptor;          /* JavaVM descriptor string of method     */
467         s4         returntype;          /* only temporary valid, return type      */
468         classinfo *returnclass;         /* pointer to classinfo for the rtn type  */ /*XTA*/ 
469         s4         paramcount;          /* only temporary valid, parameter count  */
470         u1        *paramtypes;          /* only temporary valid, parameter types  */
471         classinfo **paramclass;         /* pointer to classinfo for a parameter   */ /*XTA*/
472         
473         classinfo *class;               /* class, the method belongs to           */
474         s4         vftblindex;          /* index of method in virtual function table
475                                            (if it is a virtual method)            */
476         s4         maxstack;            /* maximum stack depth of method          */
477         s4         maxlocals;           /* maximum number of local variables      */
478         s4         jcodelength;         /* length of JavaVM code                  */
479         u1        *jcode;               /* pointer to JavaVM code                 */
480
481         s4         exceptiontablelength;/* exceptiontable length                  */
482         exceptiontable *exceptiontable; 
483                                     /* the exceptiontable                     */
484
485         u1        *stubroutine;         /* stub for compiling or calling natives  */    
486         s4         mcodelength;         /* legth of generated machine code        */
487         u1        *mcode;               /* pointer to machine code                */
488         u1        *entrypoint;          /* entry point in machine code            */
489
490         /*rtainfo   rta;*/
491         xtainfo    *xta;
492
493         s4        methodUsed;           /* marked (might be used later) /not used /used */
494         s4        monoPoly;             /* call is mono or poly or unknown        */ /*RT stats */
495         /* should # method def'd and used be kept after static parse (will it be used?) */
496         s4        subRedefs;
497         s4        subRedefsUsed;
498 };
499
500
501
502 /* innerclassinfo *************************************************************/
503
504 typedef struct innerclassinfo {
505         classinfo *inner_class;       /* inner class pointer                      */
506         classinfo *outer_class;       /* outer class pointer                      */
507         utf *name;                    /* innerclass name                          */ 
508         s4 flags;                     /* ACC flags                                */
509 } innerclassinfo;
510
511 /* classinfo ******************************************************************/
512
513 struct classinfo {                /* class structure                          */
514         java_objectheader header;     /* classes are also objects                 */
515
516         s4          flags;            /* ACC flags                                */
517         utf        *name;             /* class name                               */ 
518
519         s4          cpcount;          /* number of entries in constant pool       */
520         u1         *cptags;           /* constant pool tags                       */
521         voidptr    *cpinfos;          /* pointer to constant pool info structures */
522
523         classinfo  *super;            /* super class pointer                      */
524         classinfo  *sub;              /* sub class pointer                        */
525         classinfo  *nextsub;          /* pointer to next class in sub class list  */
526
527         s4          interfacescount;  /* number of interfaces                     */
528         classinfo **interfaces;       /* pointer to interfaces                    */
529
530         s4          fieldscount;      /* number of fields                         */
531         fieldinfo  *fields;           /* field table                              */
532
533         s4          methodscount;     /* number of methods                        */
534         methodinfo *methods;          /* method table                             */
535
536         listnode    listnode;         /* linkage                                  */
537
538         bool        initialized;      /* true, if class already initialised       */ 
539         bool        linked;           /* true, if class already linked            */
540         s4          index;            /* hierarchy depth (classes) or index
541                                          (interfaces)                             */ 
542         s4          instancesize;     /* size of an instance of this class        */
543 #ifdef SIZE_FROM_CLASSINFO
544         s4          alignedsize;      /* size of an instance, aligned to the 
545                                                       allocation size on the heap */
546 #endif
547
548         vftbl      *vftbl;            /* pointer to virtual function table        */
549
550         methodinfo *finalizer;        /* finalizer method                         */
551
552     u2             innerclasscount;   /* number of inner classes              */
553     innerclassinfo *innerclass;
554
555     classinfo      *hashlink;         /* link for external hash chain         */
556         bool        classvftbl;       /* has its own copy of the Class vtbl       */
557
558         s4          classUsed;        /* 0= not used 1 = used   CO-RT             */
559
560         classSetNode *impldBy;          /* implemented by class set */
561 };
562
563
564 /* virtual function table ******************************************************
565
566         The vtbl has a bidirectional layout with open ends at both sides.
567         interfacetablelength gives the number of entries of the interface table at
568         the start of the vftbl. The vftbl pointer points to &interfacetable[0].
569         vftbllength gives the number of entries of table at the end of the vftbl.
570
571         runtime type check (checkcast):
572
573         Different methods are used for runtime type check depending on the
574         argument of checkcast/instanceof.
575         
576         A check against a class is implemented via relative numbering on the class
577         hierachy tree. The tree is numbered in a depth first traversal setting
578         the base field and the diff field. The diff field gets the result of
579         (high - base) so that a range check can be implemented by an unsigned
580         compare. A sub type test is done by checking the inclusion of base of
581         the sub class in the range of the superclass.
582
583         A check against an interface is implemented via the interfacevftbl. If the
584         interfacevftbl contains a nonnull value a class is a subclass of this
585         interface.
586
587         interfacetable:
588
589         Like standard virtual methods interface methods are called using
590         virtual function tables. All interfaces are numbered sequentially
591         (starting with zero). For each class there exist an interface table
592         of virtual function tables for each implemented interface. The length
593         of the interface table is determined by the highest number of an
594         implemented interface.
595
596         The following example assumes a class which implements interface 0 and 3:
597
598         interfacetablelength = 4
599
600                   | ...       |            +----------+
601                       +-----------+            | method 2 |---> method z
602                       | class     |            | method 1 |---> method y
603                       +-----------+            | method 0 |---> method x
604                       | ivftbl  0 |----------> +----------+
605         vftblptr ---> +-----------+
606                   | ivftbl -1 |--> NULL    +----------+
607                   | ivftbl -2 |--> NULL    | method 1 |---> method x
608                   | ivftbl -3 |-----+      | method 0 |---> method a
609                   +-----------+     +----> +----------+
610      
611                               +---------------+
612                                   | length 3 = 2  |
613                                   | length 2 = 0  |
614                                   | length 1 = 0  |
615                                   | length 0 = 3  |
616         interfacevftbllength ---> +---------------+
617
618 *******************************************************************************/
619
620 struct vftbl {
621         methodptr   *interfacetable[1];    /* interface table (access via macro)  */
622
623         classinfo   *class;                /* class, the vtbl belongs to          */
624
625         s4           vftbllength;          /* virtual function table length       */
626         s4           interfacetablelength; /* interface table length              */
627
628         s4           baseval;              /* base for runtime type check         */
629         s4           diffval;              /* high - base for runtime type check  */
630
631         s4          *interfacevftbllength; /* length of interface vftbls          */
632         
633         methodptr    table[1];             /* class vftbl                         */
634 };
635
636 #define VFTBLINTERFACETABLE(v,i)       (v)->interfacetable[-i]
637
638
639 /* references to some system classes ******************************************/
640
641 extern classinfo *class_java_lang_Object;
642 extern classinfo *class_java_lang_String;
643 extern classinfo *class_java_lang_ClassCastException;
644 extern classinfo *class_java_lang_NullPointerException;
645 extern classinfo *class_java_lang_ArrayIndexOutOfBoundsException;
646 extern classinfo *class_java_lang_NegativeArraySizeException;
647 extern classinfo *class_java_lang_OutOfMemoryError;
648 extern classinfo *class_java_lang_ArithmeticException;
649 extern classinfo *class_java_lang_ArrayStoreException;
650 extern classinfo *class_java_lang_ThreadDeath;
651 extern classinfo *class_array;
652
653 /* instances of some system classes *******************************************/
654
655 extern java_objectheader *proto_java_lang_ClassCastException;
656 extern java_objectheader *proto_java_lang_NullPointerException;
657 extern java_objectheader *proto_java_lang_ArrayIndexOutOfBoundsException;
658 extern java_objectheader *proto_java_lang_NegativeArraySizeException;
659 extern java_objectheader *proto_java_lang_OutOfMemoryError;
660 extern java_objectheader *proto_java_lang_ArithmeticException;
661 extern java_objectheader *proto_java_lang_ArrayStoreException;
662 extern java_objectheader *proto_java_lang_ThreadDeath;
663
664
665 /* flag variables *************************************************************/
666
667 extern bool compileall;
668 extern bool runverbose;         
669 extern bool verbose;         
670 extern bool opt_rt;             /* Rapid Type Analysis for better inlining CO-RT*/
671 extern bool opt_xta;            /* X Type Analysis for better inlining    CO-XTA*/
672 extern bool opt_vta;            /* Variable Type Analysis for better inlining    CO-VTA*/
673
674 extern int pClassHeir;
675 extern int pCallgraph;
676 extern int pOpcodes;
677 extern int pStats;
678
679 extern void RT_jit_parse(methodinfo *m);
680 extern void printCallgraph ();
681 extern void printRThierarchyInfo(methodinfo *m);
682 extern void printObjectClassHeirarchy();
683
684 extern void XTA_jit_parse(methodinfo *m);
685
686 /* statistic variables ********************************************************/
687
688 extern int count_class_infos;
689 extern int count_const_pool_len;
690 extern int count_vftbl_len;
691 extern int count_utf_len;
692 extern int count_all_methods;
693 extern int count_vmcode_len;
694 extern int count_extable_len;
695 extern int count_class_loads;
696 extern int count_class_inits;
697 extern int count_utf_new;
698 extern int count_utf_new_found;
699
700 /* table of primitive types ***************************************************/
701
702 extern primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT];
703
704 #endif
705
706
707 /*
708  * These are local overrides for various environment variables in Emacs.
709  * Please do not remove this and leave it at the end of the file, where
710  * Emacs will automagically detect them.
711  * ---------------------------------------------------------------------
712  * Local variables:
713  * mode: c
714  * indent-tabs-mode: t
715  * c-basic-offset: 4
716  * tab-width: 4
717  * End:
718  */