Philipp Tomsich
Edwin Steiner
- $Id: global.h 1203 2004-06-22 23:14:55Z twisti $
+ $Id: global.h 1377 2004-08-01 22:01:00Z stefan $
*/
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
#include <pthread.h>
+#include <semaphore.h>
#endif
#define STATISTICS /* if enabled collects program statistics */
* categories for stack manipulations (POP,POP2,SWAP,DUP,DUP2,DUP_X1,
* DUP2_X1,DUP_X2,DUP2_X2).
*/
-/* #define TYPECHECK_STACK_COMPCAT */
+#define TYPECHECK_STACK_COMPCAT
/*
* Macros for configuration of the typechecking code
#define true 1
#define false 0
+typedef void (*functionptr) (); /* generic function pointer */
+
/* immediate data union */
#define PRIMITIVETYPE_BOOLEAN 7
#define PRIMITIVETYPE_VOID 8
-typedef void (*functionptr) (); /* generic function pointer */
-
#define MAX_ALIGN 8 /* most generic alignment for JavaVM values */
typedef struct literalstring literalstring;
typedef struct java_objectheader java_objectheader;
typedef struct classinfo classinfo;
-typedef struct vftbl vftbl;
+typedef struct _vftbl vftbl_t;
typedef u1* methodptr;
typedef struct fieldinfo fieldinfo;
typedef struct exceptiontable exceptiontable;
*/
struct java_objectheader { /* header for all objects */
- vftbl *vftbl; /* pointer to virtual function table */
+ vftbl_t *vftbl; /* pointer to virtual function table */
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- long monitorBits;
+ void *monitorPtr;
#endif
};
char *name; /* name of primitive class */
char *arrayname; /* name of primitive array class */
classinfo *arrayclass; /* primitive array class */
- vftbl *arrayvftbl; /* vftbl of primitive array class */
+ vftbl_t *arrayvftbl; /* vftbl of primitive array class */
} primitivetypeinfo;
/* methodinfo *****************************************************************/
struct methodinfo { /* method structure */
+ java_objectheader header; /* we need this in jit's monitorenter */
s4 flags; /* ACC flags */
utf *name; /* name of method */
utf *descriptor; /* JavaVM descriptor string of method */
u2 linenumbercount; /* number of linenumber attributes */
lineinfo *linenumbers; /* array of lineinfo items */
+ struct registerdata *registerdata; /* struct with all regalloc stuff */
+
+ struct codegendata *codegendata;/* struct with codegen stuff */
+
u1 *stubroutine; /* stub for compiling or calling natives */
s4 mcodelength; /* legth of generated machine code */
u1 *mcode; /* pointer to machine code */
allocation size on the heap */
#endif
- vftbl *vftbl; /* pointer to virtual function table */
+ vftbl_t *vftbl; /* pointer to virtual function table */
methodinfo *finalizer; /* finalizer method */
*******************************************************************************/
-struct vftbl {
+struct _vftbl {
methodptr *interfacetable[1]; /* interface table (access via macro) */
classinfo *class; /* class, the vtbl belongs to */
*******************************************************************************/
struct arraydescriptor {
- vftbl *componentvftbl; /* vftbl of the component type, NULL for primit. */
- vftbl *elementvftbl; /* vftbl of the element type, NULL for primitive */
+ vftbl_t *componentvftbl; /* vftbl of the component type, NULL for primit. */
+ vftbl_t *elementvftbl; /* vftbl of the element type, NULL for primitive */
short arraytype; /* ARRAYTYPE_* constant */
short dimension; /* dimension of the array (always >= 1) */
s4 dataoffset; /* offset of the array data from object pointer */
/* flag variables *************************************************************/
extern bool cacao_initializing;
-extern bool compileall;
-extern bool runverbose;
-extern bool verboseexception;
-extern bool verbose;
-extern bool opt_rt; /* Rapid Type Analysis for better inlining CO-RT*/
-extern bool opt_xta; /* X Type Analysis for better inlining CO-XTA*/
-extern bool opt_vta; /* Variable Type Analysis for better inlining CO-VTA*/
-extern bool opt_verify; /* true if classfiles should be verified */
+
#ifdef TYPECHECK_VERBOSE_OPT
extern bool typecheckverbose;
#endif
/*extern void RT_jit_parse(methodinfo *m);*/
-/* statistic variables ********************************************************/
-
-extern int count_class_infos;
-extern int count_const_pool_len;
-extern int count_vftbl_len;
-extern int count_utf_len;
-extern int count_all_methods;
-extern int count_vmcode_len;
-extern int count_extable_len;
-extern int count_class_loads;
-extern int count_class_inits;
-extern int count_utf_new;
-extern int count_utf_new_found;
-
-
/* table of primitive types ***************************************************/
/* This array can be indexed by the PRIMITIVETYPE_ and ARRAYTYPE_