GNU header update.
[cacao.git] / src / vm / global.h
index 60f88e839168a6e914411bb2306ef0520f77e07f..eb2f080f021a7a2e40a58ebedd46e9c9dc26c1d6 100644 (file)
@@ -1,9 +1,9 @@
 /* global.h - global definitions
 
-   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
-   R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
-   M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
-   P. Tomsich, J. Wenninger
+   Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
+   R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
+   C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
+   Institut f. Computersprachen - TU Wien
 
    This file is part of CACAO.
 
@@ -30,8 +30,9 @@
    Changes: Mark Probst
             Philipp Tomsich
                        Edwin Steiner
+            Joseph Wenninger
 
-   $Id: global.h 1496 2004-11-12 14:05:10Z twisti $
+   $Id: global.h 1735 2004-12-07 14:33:27Z twisti $
 
 */
 
 #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 CACAO_LIBRARY_PATH    "/jre/lib/"ARCH_DIR"/"
+#define CACAO_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;
 
 
@@ -180,21 +206,7 @@ typedef 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 *******************************************************
@@ -289,10 +301,17 @@ struct literalstring {
 
 
 /* data structure for storing information needed for a stacktrace across native functions*/
+
+typedef struct native_stackframeinfo native_stackframeinfo;
+
 struct native_stackframeinfo {
        void *oldThreadspecificHeadValue;
        void **addressOfThreadspecificHead;
        methodinfo *method;
+#ifdef __ALPHA__
+       void *savedpv;
+#endif
+       void *beginOfJavaStackframe; /*only used if != 0*/
        void *returnToFromNative;
 
 #if 0
@@ -304,7 +323,8 @@ struct native_stackframeinfo {
 #endif
 };
 
-typedef struct native_stackframeinfo native_stackframeinfo;
+
+typedef struct stacktraceelement stacktraceelement;
 
 struct stacktraceelement {
 #if POINTERSIZE == 8
@@ -315,7 +335,17 @@ struct stacktraceelement {
        methodinfo *method;
 };
 
-typedef struct stacktraceelement stacktraceelement;
+
+typedef struct stackTraceBuffer stackTraceBuffer;
+
+struct stackTraceBuffer {
+       s4                 needsFree;
+       stacktraceelement *start;
+       s4                 size;
+       s4                 full;
+};
+
+
 
 /* data structure for calls from c code to java methods */
 
@@ -490,7 +520,6 @@ typedef struct primitivetypeinfo {
 
 /* field, method and class structures *****************************************/
 
-#include "jit/sets.h"
 typedef        struct xtafldinfo {
        bool       fieldChecked;                
        classinfo *fldClassType;