From: twisti Date: Tue, 3 Apr 2007 14:00:32 +0000 (+0000) Subject: * src/vm/jit/stacktrace.c (stacktrace_create_inline_stackframeinfo): X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=ba10b520acb4d53c608c700f9790110bf540c7d7;p=cacao.git * src/vm/jit/stacktrace.c (stacktrace_create_inline_stackframeinfo): Removed. (stacktrace_inline_arithmeticexception): Likewise. (stacktrace_inline_arrayindexoutofboundsexception): Likewise. (stacktrace_inline_arraystoreexception): Likewise. (stacktrace_inline_classcastexception): Likewise. (stacktrace_inline_nullpointerexception): Likewise. (stacktrace_inline_fillInStackTrace): Likewise. (stacktrace_hardware_arithmeticexception): Likewise. (stacktrace_hardware_nullpointerexception): Likewise. * src/vm/jit/stacktrace.h: Likewise. --- diff --git a/src/vm/jit/stacktrace.c b/src/vm/jit/stacktrace.c index 2013e6e3d..ae8eb3bd9 100644 --- a/src/vm/jit/stacktrace.c +++ b/src/vm/jit/stacktrace.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stacktrace.c 7631 2007-04-02 20:04:22Z michi $ + $Id: stacktrace.c 7651 2007-04-03 14:00:32Z twisti $ */ @@ -144,46 +144,6 @@ void stacktrace_create_stackframeinfo(stackframeinfo *sfi, u1 *pv, u1 *sp, #endif /* defined(ENABLE_INTRP) */ -/* stacktrace_create_inline_stackframeinfo ************************************* - - Creates an stackframe info structure for an inline exception stub. - -*******************************************************************************/ - -void stacktrace_create_inline_stackframeinfo(stackframeinfo *sfi, u1 *pv, - u1 *sp, u1 *ra, u1 *xpc) -{ - stackframeinfo **psfi; - - /* get current stackframe info pointer */ - - psfi = STACKFRAMEINFO; - -#if defined(ENABLE_INTRP) - if (opt_intrp) { - /* if we don't have pv handy */ - - if (pv == NULL) - pv = codegen_get_pv_from_pc(ra); - - } -#endif - - /* fill new stackframe info structure */ - - sfi->prev = *psfi; - sfi->method = NULL; - sfi->pv = pv; - sfi->sp = sp; - sfi->ra = ra; - sfi->xpc = xpc; - - /* store new stackframe info pointer */ - - *psfi = sfi; -} - - /* stacktrace_create_extern_stackframeinfo ************************************* Creates an stackframe info structure for an extern exception @@ -335,259 +295,6 @@ void stacktrace_remove_stackframeinfo(stackframeinfo *sfi) } -/* stacktrace_inline_arithmeticexception *************************************** - - Creates an ArithemticException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_arithmeticexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_arithmeticexception(); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_inline_arrayindexoutofboundsexception **************************** - - Creates an ArrayIndexOutOfBoundsException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_arrayindexoutofboundsexception(u1 *pv, - u1 *sp, - u1 *ra, - u1 *xpc, - s4 index) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_arrayindexoutofboundsexception(index); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_inline_arraystoreexception *************************************** - - Creates an ArrayStoreException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_arraystoreexception(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_arraystoreexception(); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_inline_classcastexception **************************************** - - Creates an ClassCastException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_classcastexception(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc, - java_objectheader *o) -{ - stackframeinfo sfi; - java_objectheader *e; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - e = exceptions_new_classcastexception(o); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return e; -} - - -/* stacktrace_inline_nullpointerexception ************************************** - - Creates an NullPointerException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_nullpointerexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_nullpointerexception(); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_inline_fillInStackTrace ****************************************** - - Fills in the correct stacktrace into an existing exception object - (this one is for inline exception stubs). - -*******************************************************************************/ - -java_objectheader *stacktrace_inline_fillInStackTrace(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - methodinfo *m; - - /* create stackframeinfo */ - - stacktrace_create_inline_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* get exception */ - - o = *exceptionptr; - assert(o); - - /* clear exception */ - - *exceptionptr = NULL; - - /* resolve methodinfo pointer from exception object */ - -#if defined(ENABLE_JAVASE) - m = class_resolvemethod(o->vftbl->class, - utf_fillInStackTrace, - utf_void__java_lang_Throwable); -#elif defined(ENABLE_JAVAME_CLDC1_1) - m = class_resolvemethod(o->vftbl->class, - utf_fillInStackTrace, - utf_void__void); -#else -#error IMPLEMENT ME! -#endif - - /* call function */ - - (void) vm_call_method(m, o); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_hardware_arithmeticexception ************************************* - - Creates an ArithemticException for inline stub. - -*******************************************************************************/ - -java_objectheader *stacktrace_hardware_arithmeticexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_extern_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_arithmeticexception(); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - -/* stacktrace_hardware_nullpointerexception ************************************ - - Creates an NullPointerException for the SIGSEGV signal handler. - -*******************************************************************************/ - -java_objectheader *stacktrace_hardware_nullpointerexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc) -{ - stackframeinfo sfi; - java_objectheader *o; - - /* create stackframeinfo */ - - stacktrace_create_extern_stackframeinfo(&sfi, pv, sp, ra, xpc); - - /* create exception */ - - o = exceptions_new_nullpointerexception(); - - /* remove stackframeinfo */ - - stacktrace_remove_stackframeinfo(&sfi); - - return o; -} - - /* stacktrace_add_entry ******************************************************** Adds a new entry to the stacktrace buffer. diff --git a/src/vm/jit/stacktrace.h b/src/vm/jit/stacktrace.h index 270007259..b1155534c 100644 --- a/src/vm/jit/stacktrace.h +++ b/src/vm/jit/stacktrace.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stacktrace.h 7409 2007-02-27 02:07:00Z ajordan $ + $Id: stacktrace.h 7651 2007-04-03 14:00:32Z twisti $ */ @@ -111,9 +111,6 @@ void stacktrace_create_stackframeinfo(stackframeinfo *sfi, u1 *pv, u1 *sp, u1 *ra); #endif -void stacktrace_create_inline_stackframeinfo(stackframeinfo *sfi, u1 *pv, - u1 *sp, u1 *ra, u1 *xpc); - void stacktrace_create_extern_stackframeinfo(stackframeinfo *sfi, u1 *pv, u1 *sp, u1 *ra, u1 *xpc); @@ -122,51 +119,6 @@ void stacktrace_create_native_stackframeinfo(stackframeinfo *sfi, u1 *pv, void stacktrace_remove_stackframeinfo(stackframeinfo *sfi); -/* inline exception creating functions */ -java_objectheader *stacktrace_inline_arithmeticexception(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc); -#define STACKTRACE_inline_arithmeticexception \ - (functionptr) stacktrace_inline_arithmeticexception - - -java_objectheader *stacktrace_inline_arrayindexoutofboundsexception(u1 *pv, - u1 *sp, - u1 *ra, - u1 *xpc, - s4 index); -#define STACKTRACE_inline_arrayindexoutofboundsexception \ - (functionptr) stacktrace_inline_arrayindexoutofboundsexception - -java_objectheader *stacktrace_inline_arraystoreexception(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc); -#define STACKTRACE_inline_arraystoreexception \ - (functionptr) stacktrace_inline_arraystoreexception - -java_objectheader *stacktrace_inline_classcastexception(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc, - java_objectheader *o); -#define STACKTRACE_inline_classcastexception \ - (functionptr) stacktrace_inline_classcastexception - -java_objectheader *stacktrace_inline_nullpointerexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc); -#define STACKTRACE_inline_nullpointerexception \ - (functionptr) stacktrace_inline_nullpointerexception - -/* refill the stacktrace of an existing exception */ -java_objectheader *stacktrace_inline_fillInStackTrace(u1 *pv, u1 *sp, u1 *ra, - u1 *xpc); -#define STACKTRACE_inline_fillInStackTrace \ - (functionptr) stacktrace_inline_fillInStackTrace - - -/* hardware exception creating functions */ -java_objectheader *stacktrace_hardware_arithmeticexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc); - -java_objectheader *stacktrace_hardware_nullpointerexception(u1 *pv, u1 *sp, - u1 *ra, u1 *xpc); - stacktracecontainer *stacktrace_fillInStackTrace(void);