Philipp Tomsich
Edwin Steiner
- $Id: global.h 1442 2004-11-05 13:51:49Z twisti $
+ $Id: global.h 1680 2004-12-04 12:02:08Z jowenn $
*/
#ifndef _GLOBAL_H
#define _GLOBAL_H
-
#include "config.h"
#include "types.h"
+
+
+/* resolve typedef cycles *****************************************************/
+
+typedef struct utf utf;
+typedef struct literalstring literalstring;
+typedef struct java_objectheader java_objectheader;
+typedef struct classinfo classinfo;
+typedef struct _vftbl vftbl_t;
+typedef u1* methodptr;
+typedef struct fieldinfo fieldinfo;
+typedef struct exceptiontable exceptiontable;
+typedef struct methodinfo methodinfo;
+typedef struct lineinfo lineinfo;
+typedef struct arraydescriptor arraydescriptor;
+
+
+/* additional data types ******************************************************/
+
+typedef void *voidptr; /* generic pointer */
+typedef void (*functionptr) (); /* generic function pointer */
+
+typedef int bool; /* boolean data type */
+
+#define true 1
+#define false 0
+
+
+/* additional includes ********************************************************/
+
#include "toolbox/list.h"
+#include "vm/jit/inline/sets.h"
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
#include <semaphore.h>
#endif
+/* define path to rt.jar plus ending : ****************************************/
+
+#define RT_JAR_PATH "/jre/lib/rt.jar:"
+
+
#define STATISTICS /* if enabled collects program statistics */
/*
#endif
-/* additional data types ******************************************************/
-
-typedef void *voidptr; /* generic pointer */
-
-typedef int bool; /* boolean data type */
-
-#define true 1
-#define false 0
-
-typedef void (*functionptr) (); /* generic function pointer */
-
-
/* immediate data union */
typedef union {
- s4 i;
- s8 l;
- float f;
- double d;
- void *a;
- u1 b[8];
+ s4 i;
+ s8 l;
+ float f;
+ double d;
+ void *a;
+ functionptr fp;
+ u1 b[8];
} imm_union;
#define ACC_NATIVE 0x0100
#define ACC_INTERFACE 0x0200
#define ACC_ABSTRACT 0x0400
-#define ACC_STRICT 0x0800
-
-/* resolve typedef cycles *****************************************************/
-
-typedef struct utf utf;
-typedef struct literalstring literalstring;
-typedef struct java_objectheader java_objectheader;
-typedef struct classinfo classinfo;
-typedef struct _vftbl vftbl_t;
-typedef u1* methodptr;
-typedef struct fieldinfo fieldinfo;
-typedef struct exceptiontable exceptiontable;
-typedef struct methodinfo methodinfo;
-typedef struct lineinfo lineinfo;
-typedef struct arraydescriptor arraydescriptor;
+#define ACC_STRICT 0x0800
/* constant pool entries *******************************************************
void *oldThreadspecificHeadValue;
void **addressOfThreadspecificHead;
methodinfo *method;
+ void *beginOfJavaStackframe; /*only used if != 0*/
void *returnToFromNative;
#if 0
typedef struct stacktraceelement stacktraceelement;
+typedef struct stackTraceBuffer {
+ int needsFree;
+ struct stacktraceelement* start;
+ size_t size;
+ size_t full;
+} stackTraceBuffer;
+
+
+
/* data structure for calls from c code to java methods */
struct jni_callblock {
/* field, method and class structures *****************************************/
-#include "jit/sets.h"
typedef struct xtafldinfo {
bool fieldChecked;
classinfo *fldClassType;
methSet *calls; /* methods this method calls */
methSet *calledBy; /* methods that call this method */
- methSet *marked; //not in Dez /* methods that marked by this method */
+ methSet *marked; /*not in Dez*/ /* methods that marked by this method */
methSet *markedBy;
fldSet *fldsUsed; /* fields used by this method */
/*methSetNode *interfaceCalls*/ /* methods this method calls as interface */
u1 *stubroutine; /* stub for compiling or calling natives */
s4 mcodelength; /* legth of generated machine code */
- u1 *mcode; /* pointer to machine code */
- u1 *entrypoint; /* entry point in machine code */
+ functionptr mcode; /* pointer to machine code */
+ functionptr entrypoint; /* entry point in machine code */
/*rtainfo rta;*/
xtainfo *xta;