* src/vm/jit/powerpc/emit.c (emit_replacement_stubs): Do not
[cacao.git] / src / vm / exceptions.h
index 5f9467cdacd65cfb675641282835a06a88896f54..e3e1d2c9f5c65b2260ede0c487c66403dd564153 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: exceptions.h 5278 2006-08-25 07:54:27Z twisti $
+   $Id: exceptions.h 6123 2006-12-05 21:10:54Z twisti $
 
 */
 
@@ -38,8 +38,6 @@
 
 /* forward typedefs ***********************************************************/
 
-typedef struct exceptionentry exceptionentry;
-
 #include "config.h"
 #include "vm/types.h"
 
@@ -51,6 +49,27 @@ typedef struct exceptionentry exceptionentry;
 #include "vm/method.h"
 
 
+/* hardware-exception defines **************************************************
+
+   These defines define the load-offset which indicates the given
+   exception.
+
+   ATTENTION: These offsets need NOT to be aligned to 4 or 8-byte
+   boundaries, since normal loads could have such offsets with a base
+   of NULL which should result in a NullPointerException.
+
+*******************************************************************************/
+
+#define EXCEPTION_LOAD_DISP_NULLPOINTER              0
+#define EXCEPTION_LOAD_DISP_ARITHMETIC               1
+#define EXCEPTION_LOAD_DISP_ARRAYINDEXOUTOFBOUNDS    2
+#define EXCEPTION_LOAD_DISP_CLASSCAST                3
+
+#define EXCEPTION_LOAD_DISP_PATCHER                  5
+
+
+/* exception pointer **********************************************************/
+
 #if defined(ENABLE_THREADS)
 #define exceptionptr    &(THREADOBJECT->_exceptionptr)
 #else
@@ -62,21 +81,6 @@ extern java_objectheader *_no_threads_exceptionptr;
 #endif
 
 
-/* exceptionentry **************************************************************
-
-   Datastructure which represents an exception entry in the exception
-   table residing in the data segment.
-
-*******************************************************************************/
-
-struct exceptionentry {
-       classref_or_classinfo  catchtype;
-       u1                    *handlerpc;
-       u1                    *endpc;
-       u1                    *startpc;
-};
-
-
 /* function prototypes ********************************************************/
 
 /* load and link exceptions used in the system */
@@ -161,7 +165,7 @@ void               exceptions_throw_illegalmonitorstateexception(void);
 java_objectheader *new_negativearraysizeexception(void);
 void exceptions_throw_negativearraysizeexception(void);
 
-java_objectheader *new_nullpointerexception(void);
+java_objectheader *exceptions_new_nullpointerexception(void);
 void exceptions_throw_nullpointerexception(void);
 
 java_objectheader *exceptions_new_stringindexoutofboundsexception(void);