There is no need to create CFG edges after athrow to exception handlers because VM stack is empty at exception handler entry. Exceptional flow is special because it "resets" the mimic stack and we do not need to resolve anything across this boundary yet. We do not create any edges for every PEI (eg. idiv, invokevirtual), so we should not confuse the reader with creating adges after athrow.
Signed-off-by: Tomek Grabiec <tgrab...@gmail.com> --- jit/cfg-analyzer.c | 47 ----------------------------------------------- 1 files changed, 0 insertions(+), 47 deletions(-) diff --git a/jit/cfg-analyzer.c b/jit/cfg-analyzer.c index 61cc9ba..d667b24 100644 --- a/jit/cfg-analyzer.c +++ b/jit/cfg-analyzer.c @@ -137,50 +137,6 @@ static int split_after_branches(struct stream *stream, return err; } -static int update_athrow_successors(struct stream *stream, - struct compilation_unit *cu) -{ - struct vm_method *method; - int err = 0; - - method = cu->method; - - for (; stream_has_more(stream); stream_advance(stream)) { - struct basic_block *bb; - unsigned long offset; - int i; - - offset = stream_offset(stream); - - if (!bc_is_athrow(*stream->current)) - continue; - - bb = find_bb(cu, offset); - - for (i = 0; i < method->code_attribute.exception_table_length; - i++) - { - struct cafebabe_code_attribute_exception *eh; - - eh = &method->code_attribute.exception_table[i]; - - if (exception_covers(eh, offset)) { - struct basic_block *eh_bb; - - eh_bb = find_bb(cu, eh->handler_pc); - assert(eh_bb != NULL); - - err = bb_add_successor(bb, eh_bb); - if (err) - goto out; - } - } - } - - out: - return err; -} - static bool all_exception_handlers_have_bb(struct compilation_unit *cu) { struct vm_method *method = cu->method; @@ -251,9 +207,6 @@ int analyze_control_flow(struct compilation_unit *cu) detect_exception_handlers(cu); bytecode_stream_init(&stream, cu->method); - err = update_athrow_successors(&stream, cu); - if (err) - goto out; /* * This checks whether every exception handler has its own -- 1.6.0.6 ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Jatovm-devel mailing list Jatovm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jatovm-devel