Signed-off-by: Tomek Grabiec <[email protected]>
---
include/jit/exception.h | 1 +
jit/exception.c | 9 +++++++++
test/jit/Makefile | 1 +
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/include/jit/exception.h b/include/jit/exception.h
index f9caac3..5c0b0e0 100644
--- a/include/jit/exception.h
+++ b/include/jit/exception.h
@@ -39,6 +39,7 @@ unsigned char *throw_exception(struct compilation_unit *cu,
void throw_exception_from_signal(void *ctx, struct object *exception);
void unwind(void);
void signal_exception(struct object *obj);
+void signal_new_exception(char *class_name, char *msg);
void clear_exception(void);
struct object *exception_occurred(void);
void init_exceptions(void);
diff --git a/jit/exception.c b/jit/exception.c
index 1670489..4d1b538 100644
--- a/jit/exception.c
+++ b/jit/exception.c
@@ -32,6 +32,7 @@
#include <vm/guard-page.h>
#include <vm/buffer.h>
+#include <vm/class.h>
#include <vm/die.h>
#include <arch/stack-frame.h>
@@ -72,6 +73,14 @@ void signal_exception(struct object *exception)
exception_guard = exceptions_guard_page;
}
+void signal_new_exception(char *class_name, char *msg)
+{
+ struct object *e;
+
+ e = new_exception(class_name, msg);
+ signal_exception(e);
+}
+
struct object *exception_occurred(void)
{
return getExecEnv()->exception;
diff --git a/test/jit/Makefile b/test/jit/Makefile
index 509d870..bed9cf7 100644
--- a/test/jit/Makefile
+++ b/test/jit/Makefile
@@ -46,6 +46,7 @@ OBJS = \
../jamvm/resolve-stub.o \
../jamvm/thread-stub.o \
../jamvm/cast-stub.o \
+ ../jamvm/class-stub.o \
../arch-mmix/instruction.o \
../arch-mmix/use-def.o \
../arch-mmix/stack-frame.o \
--
1.6.0.6
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises
looking to deploy the next generation of Solaris that includes the latest
innovations from Sun and the OpenSource community. Download a copy and
enjoy capabilities such as Networking, Storage and Virtualization.
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Jatovm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jatovm-devel