* src/vm/exceptions.c (exceptions_get_exception)
[cacao.git] / src / vm / exceptions.h
index 8bce2f11e257a9dfa2695b366dc17dd600d6365e..6d3e5241277a09f47f9c24f5066a19bb9a1d2e5d 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: exceptions.h 7609 2007-03-29 17:09:48Z michi $
+   $Id: exceptions.h 8087 2007-06-14 16:01:12Z twisti $
 
 */
 
    8-byte boundaries, since normal loads could have such offsets with
    a base of NULL which should result in a NullPointerException.
 
+   NOTE: In signal_init() we have a check whether the offset of
+   java_objectheader.data[0] is greater than the largest displacement
+   defined below.  Otherwise normal array loads/stores could trigger
+   an exception.
+
 *******************************************************************************/
 
 #define EXCEPTION_HARDWARE_NULLPOINTER              0
 #define EXCEPTION_HARDWARE_CLASSCAST                3
 
 #define EXCEPTION_HARDWARE_EXCEPTION                5
-
 #define EXCEPTION_HARDWARE_PATCHER                  6
 
 
 /* function prototypes ********************************************************/
 
-/* load and link exceptions used in the system */
-bool exceptions_init(void);
+bool               exceptions_init(void);
 
-/* initialize new exceptions */
+java_objectheader *exceptions_get_exception(void);
+void               exceptions_set_exception(java_objectheader *o);
+void               exceptions_clear_exception(void);
+java_objectheader *exceptions_get_and_clear_exception(void);
 
 java_objectheader *new_exception_utfmessage(const char *classname,
                                                                                        utf *message);
 
-java_objectheader *new_exception_int(const char *classname, s4 i);
-
 
 /* functions to generate compiler exceptions */
 
@@ -87,6 +91,7 @@ void exceptions_throw_classcircularityerror(classinfo *c);
 void exceptions_throw_classformaterror(classinfo *c, const char *message, ...);
 void exceptions_throw_classnotfoundexception(utf *name);
 void exceptions_throw_noclassdeffounderror(utf *name);
+void exceptions_throw_noclassdeffounderror_cause(java_objectheader *cause);
 void exceptions_throw_noclassdeffounderror_wrong_name(classinfo *c, utf *name);
 void exceptions_throw_linkageerror(const char *message, classinfo *c);
 void exceptions_throw_nosuchfielderror(classinfo *c, utf *name);
@@ -111,7 +116,7 @@ void exceptions_throw_arraystoreexception(void);
 java_objectheader *exceptions_new_classcastexception(java_objectheader *o);
 
 void exceptions_throw_clonenotsupportedexception(void);
-void exceptions_throw_illegalaccessexception(classinfo *c);
+void exceptions_throw_illegalaccessexception(utf *message);
 void exceptions_throw_illegalargumentexception(void);
 void exceptions_throw_illegalmonitorstateexception(void);
 void exceptions_throw_interruptedexception(void);
@@ -121,16 +126,12 @@ void exceptions_throw_negativearraysizeexception(void);
 
 java_objectheader *exceptions_new_nullpointerexception(void);
 void exceptions_throw_nullpointerexception(void);
+void exceptions_throw_privilegedactionexception(java_objectheader *cause);
 void exceptions_throw_stringindexoutofboundsexception(void);
 
-java_objectheader *exceptions_fillinstacktrace(void);
-
-void classnotfoundexception_to_noclassdeffounderror(void);
+void exceptions_classnotfoundexception_to_noclassdeffounderror(void);
 
-java_objectheader *exceptions_get_exception(void);
-void               exceptions_set_exception(java_objectheader *o);
-void               exceptions_clear_exception(void);
-java_objectheader *exceptions_get_and_clear_exception(void);
+java_objectheader *exceptions_fillinstacktrace(void);
 
 java_objectheader *exceptions_new_hardware_exception(u1 *pv, u1 *sp, u1 *ra, u1 *xpc, s4 type, ptrint val);