From: Rhys Weatherley Date: Mon, 24 May 2004 05:53:55 +0000 (+0000) Subject: _jit_gen_start_block: set the address of the exception handler for X-Git-Tag: r.0.0.4~89 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=be08d549bfdb577398e19fe124768f9021bd5e4c;p=francis%2Flibjit.git _jit_gen_start_block: set the address of the exception handler for interpreted code. --- 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); + } } /*@