X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fvm%2Fexceptions.h;h=627169e7d579101521f86abf8190955aa1bf6eb3;hb=4ac11d1cd00126f78ec8f08c2bcf33f5470e95c4;hp=0a23a1eb594b1c4722b500fea85e90826643a4f6;hpb=5b3443f6552fd6daf9defc874859e92b4977cd91;p=cacao.git diff --git a/src/vm/exceptions.h b/src/vm/exceptions.h index 0a23a1eb5..627169e7d 100644 --- a/src/vm/exceptions.h +++ b/src/vm/exceptions.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: exceptions.h 8004 2007-06-04 12:59:04Z twisti $ + $Id: exceptions.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -37,6 +37,8 @@ #include "vm/global.h" +#include "vm/jit/stacktrace.h" + #include "vmcore/references.h" #include "vmcore/method.h" @@ -51,8 +53,8 @@ 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 + NOTE: In exceptions_init() we have a check whether the offset of + java_arrayheader.data[0] is greater than the largest displacement defined below. Otherwise normal array loads/stores could trigger an exception. @@ -65,35 +67,41 @@ #define EXCEPTION_HARDWARE_EXCEPTION 5 #define EXCEPTION_HARDWARE_PATCHER 6 +#define EXCEPTION_HARDWARE_COMPILER 7 + +#define EXCEPTION_HARDWARE_LARGEST 7 /* function prototypes ********************************************************/ -/* load and link exceptions used in the system */ -bool exceptions_init(void); +bool exceptions_init(void); -/* initialize new exceptions */ +java_handle_t *exceptions_get_exception(void); +void exceptions_set_exception(java_handle_t *o); +void exceptions_clear_exception(void); +java_handle_t *exceptions_get_and_clear_exception(void); -java_objectheader *new_exception_utfmessage(const char *classname, +java_handle_t *new_exception_utfmessage(const char *classname, utf *message); /* functions to generate compiler exceptions */ -java_objectheader *exceptions_new_abstractmethoderror(void); -java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra); -java_objectheader *exceptions_new_arraystoreexception(void); +java_handle_t *exceptions_new_abstractmethoderror(void); +java_handle_t *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra); +java_handle_t *exceptions_new_arraystoreexception(void); void exceptions_throw_abstractmethoderror(void); 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_handle_t *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); void exceptions_throw_nosuchmethoderror(classinfo *c, utf *name, utf *desc); -void exceptions_throw_exceptionininitializererror(java_objectheader *cause); +void exceptions_throw_exceptionininitializererror(java_handle_t *cause); void exceptions_throw_incompatibleclasschangeerror(classinfo *c, const char *message); void exceptions_throw_instantiationerror(classinfo *c); @@ -104,13 +112,13 @@ void exceptions_throw_verifyerror_for_stack(methodinfo *m, int type); void exceptions_throw_unsatisfiedlinkerror(utf *name); void exceptions_throw_unsupportedclassversionerror(classinfo *c, u4 ma, u4 mi); -java_objectheader *exceptions_new_arithmeticexception(void); +java_handle_t *exceptions_new_arithmeticexception(void); -java_objectheader *exceptions_new_arrayindexoutofboundsexception(s4 index); +java_handle_t *exceptions_new_arrayindexoutofboundsexception(s4 index); void exceptions_throw_arrayindexoutofboundsexception(void); void exceptions_throw_arraystoreexception(void); -java_objectheader *exceptions_new_classcastexception(java_objectheader *o); +java_handle_t *exceptions_new_classcastexception(java_handle_t *o); void exceptions_throw_clonenotsupportedexception(void); void exceptions_throw_illegalaccessexception(utf *message); @@ -118,25 +126,19 @@ void exceptions_throw_illegalargumentexception(void); void exceptions_throw_illegalmonitorstateexception(void); void exceptions_throw_interruptedexception(void); void exceptions_throw_instantiationexception(classinfo *c); -void exceptions_throw_invocationtargetexception(java_objectheader *cause); +void exceptions_throw_invocationtargetexception(java_handle_t *cause); void exceptions_throw_negativearraysizeexception(void); -java_objectheader *exceptions_new_nullpointerexception(void); +java_handle_t *exceptions_new_nullpointerexception(void); void exceptions_throw_nullpointerexception(void); +void exceptions_throw_privilegedactionexception(java_handle_t *cause); void exceptions_throw_stringindexoutofboundsexception(void); -java_objectheader *exceptions_fillinstacktrace(void); - -void 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); +void exceptions_classnotfoundexception_to_noclassdeffounderror(void); -java_objectheader *exceptions_new_hardware_exception(u1 *pv, u1 *sp, u1 *ra, u1 *xpc, s4 type, ptrint val); +java_handle_t *exceptions_fillinstacktrace(void); -void exceptions_print_exception(java_objectheader *xptr); +void exceptions_print_exception(java_handle_t *xptr); void exceptions_print_current_exception(void); void exceptions_print_stacktrace(void);