From be08d549bfdb577398e19fe124768f9021bd5e4c Mon Sep 17 00:00:00 2001 From: Rhys Weatherley Date: Mon, 24 May 2004 05:53:55 +0000 Subject: [PATCH] _jit_gen_start_block: set the address of the exception handler for interpreted code. --- ChangeLog | 3 +++ jit/jit-rules-interp.c | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/ChangeLog b/ChangeLog index bb5dc29..ed48329 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,9 @@ rewrite the exception region routines to make them easier to use from CLI and JVM style systems. + * jit/jit-rules-interp.c (_jit_gen_start_block): set the address + of the exception handler for interpreted code. + 2004-05-22 Rhys Weatherley * jit/jit-block.c (_jit_block_peephole_branch): don't allow diff --git a/jit/jit-rules-interp.c b/jit/jit-rules-interp.c index 2b0bebc..7d089e7 100644 --- a/jit/jit-rules-interp.c +++ b/jit/jit-rules-interp.c @@ -1647,6 +1647,14 @@ void _jit_gen_start_block(jit_gencode_t gen, jit_block_t block) fixup = next; } block->fixup_list = 0; + + /* If this is the exception catcher block, then we need to update + the exception cookie for the function to point to here */ + if(block->label == block->func->builder->catcher_label && + block->func->has_try) + { + _jit_cache_set_cookie(&(gen->posn), block->address); + } } /*@ -- 2.47.3