From f8026b17d69504a8577da8b76b59f2f972bdf512 Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 31 May 2004 11:24:49 +0000 Subject: [PATCH] Throw exceptions correctly for "check_null". --- ChangeLog | 2 ++ jit/jit-rules-x86.sel | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 55cf553..f1fe449 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,8 @@ * jit/jit-rules-x86.c, jit/jit-rules-x86.sel, tools/gen-sel-parser.y, tools/gen-sel-scanner.l: inline and optimize divisions for x86. + * jit/jit-rules-x86.sel: throw exceptions correctly for "check_null". + 2004-05-30 Rhys Weatherley * doc/libjit.texi: clarify the text that describes LLVM, at the diff --git a/jit/jit-rules-x86.sel b/jit/jit-rules-x86.sel index f40003d..b6b38c7 100644 --- a/jit/jit-rules-x86.sel +++ b/jit/jit-rules-x86.sel @@ -1418,14 +1418,11 @@ JIT_OP_IGE_UN: binary JIT_OP_CHECK_NULL: unary_note [reg] -> { - /* TODO: won't work in a function with a "try" block */ unsigned char *patch; - TODO(); x86_alu_reg_reg(inst, X86_OR, $1, $1); patch = inst; x86_branch8(inst, X86_CC_NE, 0, 0); - x86_push_imm(inst, JIT_RESULT_NULL_REFERENCE); - x86_call_code(inst, (void *)jit_exception_builtin); + inst = throw_builtin(inst, func, JIT_RESULT_NULL_REFERENCE); x86_patch(patch, inst); } -- 2.47.3