These should not reside in cvs.
[cacao.git] / global.h
index f5576c3e637bc03fdc0e1082ce3006432b52235a..596059445b2a3fce8771659d54446770ba876576 100644 (file)
--- a/global.h
+++ b/global.h
@@ -31,7 +31,7 @@
             Philipp Tomsich
                        Edwin Steiner
 
-   $Id: global.h 911 2004-02-04 11:42:41Z carolyn $
+   $Id: global.h 963 2004-03-15 07:37:49Z jowenn $
 
 */
 
@@ -195,6 +195,7 @@ typedef struct vftbl vftbl;
 typedef u1* methodptr;
 typedef struct fieldinfo  fieldinfo; 
 typedef struct methodinfo methodinfo; 
+typedef struct lineinfo lineinfo; 
 typedef struct arraydescriptor arraydescriptor;
 
 
@@ -289,6 +290,28 @@ struct literalstring {
 };
 
 
+/* data structure for storing information needed for a stacktrace across native functions*/
+struct native_stackframeinfo {
+       void *returnFromNative;
+       void *addrReturnFromNative;
+       methodinfo *method;
+       struct native_stackframeinfo *next;
+       struct native_stackframeinfo *prev;
+};
+
+typedef struct native_stackframeinfo native_stackframeinfo;
+
+struct stacktraceelement {
+#if POINTERSIZE == 8
+       u8 linenumber;
+#else
+       u4 linenumber;
+#endif
+       methodinfo *method;
+};
+
+typedef struct stacktraceelement stacktraceelement;
+
 /* data structure for calls from c code to java methods */
 
 struct jni_callblock {
@@ -534,6 +557,12 @@ typedef struct xtainfo {
 } xtainfo; 
 
 
+/* lineinfo *****************************************************************/
+struct lineinfo {
+       u2 start_pc;
+       u2 line_number;
+};
+
 /* methodinfo *****************************************************************/
 
 struct methodinfo {                 /* method structure                       */
@@ -555,8 +584,13 @@ struct methodinfo {                 /* method structure                       */
        u1        *jcode;               /* pointer to JavaVM code                 */
 
        s4         exceptiontablelength;/* exceptiontable length                  */
-       exceptiontable *exceptiontable; 
-                                    /* the exceptiontable                     */
+       exceptiontable *exceptiontable; /* the exceptiontable                     */
+
+       u2      thrownexceptionscount; /*number of exceptions declared to be thrown by a method*/
+       classinfo **thrownexceptions;  /*array of classinfos of declared exceptions*/
+
+       u2      linenumbercount;        /*number of linenumber attributes*/
+       lineinfo *linenumbers;          /*array of lineinfo items (start_pc,line_number)*/
 
        u1        *stubroutine;         /* stub for compiling or calling natives  */    
        s4         mcodelength;         /* legth of generated machine code        */
@@ -645,6 +679,8 @@ struct classinfo {                /* class structure                          */
 
        classSetNode *impldBy;        /* implemented by class set                 */
        utf        *packagename;      /* full name of the package                 */
+       utf        *sourcefile;       /* classfile name containing this class     */
+       java_objectheader *classloader;       /* 0 for bootstrap classloader */
 };
 
 /* check if class is an array class. Only use for linked classes! */
@@ -812,6 +848,7 @@ extern java_objectheader *proto_java_lang_ThreadDeath;
 
 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*/