From a5b46d2b50f7d500e0573383defe76db0b262b2d Mon Sep 17 00:00:00 2001 From: Aleksey Demakov Date: Mon, 10 Apr 2006 19:42:40 +0000 Subject: [PATCH] initialize thrown_exception value --- ChangeLog | 5 +++++ jit/jit-insn.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 50e3a1d..ab6ce00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-04-11 Aleksey Demakov + + * jit/jit-insn.c (jit_insn_start_catcher): initialize + thrown_exception (the problem was found by Klaus). + 2006-04-08 Aleksey Demakov * jit/jit-opcode.c: add jump table into jit_opcodes array. diff --git a/jit/jit-insn.c b/jit/jit-insn.c index 8a8127d..e3fc3a4 100644 --- a/jit/jit-insn.c +++ b/jit/jit-insn.c @@ -7228,6 +7228,10 @@ int jit_insn_uses_catcher(jit_function_t func) jit_value_t jit_insn_start_catcher(jit_function_t func) { jit_value_t value; +#if !defined(JIT_BACKEND_INTERP) + jit_value_t last_exception; + jit_type_t type; +#endif if(!_jit_function_ensure_builder(func)) { return 0; @@ -7248,6 +7252,17 @@ jit_value_t jit_insn_start_catcher(jit_function_t func) { return 0; } +#else + type = jit_type_create_signature(jit_abi_cdecl, jit_type_void_ptr, 0, 0, 1); + if(!type) + { + return 0; + } + last_exception = jit_insn_call_native( + func, "jit_exception_get_last", + (void *)jit_exception_get_last, type, 0, 0, JIT_CALL_NOTHROW); + jit_insn_store(func, value, last_exception); + jit_type_free(type); #endif return value; } -- 2.47.3