[svn:parrot] r48354 - in trunk: include/parrot src
cotto at svn.parrot.org
cotto at svn.parrot.org
Mon Aug 9 03:55:54 UTC 2010
Author: cotto
Date: Mon Aug 9 03:55:54 2010
New Revision: 48354
URL: https://trac.parrot.org/parrot/changeset/48354
Log:
store a reference to a thrown exception in the runloop struct
Modified:
trunk/include/parrot/call.h
trunk/src/exceptions.c
Modified: trunk/include/parrot/call.h
==============================================================================
--- trunk/include/parrot/call.h Mon Aug 9 03:43:34 2010 (r48353)
+++ trunk/include/parrot/call.h Mon Aug 9 03:55:54 2010 (r48354)
@@ -29,6 +29,7 @@
* jump buffer stack */
opcode_t *handler_start; /* Used in exception handling */
int id; /* runloop id */
+ PMC *exception; /* Reference to the exception object */
/* let the biggest element cross the cacheline boundary */
Parrot_jump_buff resume; /* jmp_buf */
Modified: trunk/src/exceptions.c
==============================================================================
--- trunk/src/exceptions.c Mon Aug 9 03:43:34 2010 (r48353)
+++ trunk/src/exceptions.c Mon Aug 9 03:55:54 2010 (r48354)
@@ -242,6 +242,7 @@
if (PObj_get_FLAGS(handler) & SUB_FLAG_C_HANDLER) {
/* it's a C exception handler */
Parrot_runloop * const jump_point = (Parrot_runloop *)address;
+ jump_point->exception = exception;
longjmp(jump_point->resume, 1);
}
@@ -367,6 +368,7 @@
if (PObj_get_FLAGS(handler) & SUB_FLAG_C_HANDLER) {
Parrot_runloop * const jump_point =
(Parrot_runloop * const)VTABLE_get_pointer(interp, handler);
+ jump_point->exception = exception;
longjmp(jump_point->resume, 1);
}
More information about the parrot-commits
mailing list