We should stop scanning on every RET instruction Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- jit/subroutine.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/jit/subroutine.c b/jit/subroutine.c index bbfad16..e831d17 100644 --- a/jit/subroutine.c +++ b/jit/subroutine.c @@ -333,11 +333,12 @@ static int do_subroutine_scan(struct subroutine_scan_context *ctx, ctx->visited_code[pc]++; - if (bc_is_ret(&c[pc]) && - bc_get_ret_index(&c[pc]) == ctx->sub->ret_index) { - if (ctx->sub->end_pc == PC_UNKNOWN || - pc > ctx->sub->end_pc) - ctx->sub->end_pc = pc; + if (bc_is_ret(&c[pc])) { + if (bc_get_ret_index(&c[pc]) == ctx->sub->ret_index && + (ctx->sub->end_pc == PC_UNKNOWN || + pc > ctx->sub->end_pc)) + ctx->sub->end_pc = pc; + return 0; } -- 1.6.0.6 ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel