From e04848573044b3a9934777f9135170f3eb652466 Mon Sep 17 00:00:00 2001 From: roland Date: Fri, 2 Mar 2012 16:04:24 +0100 Subject: [PATCH] 6910464: Lookupswitch and Tableswitch default branches not recognized as safepoints Summary: C1 does not recognize the default branch of a lookupswitch or tableswitch bytecode to be a safepoint if backward. Reviewed-by: kvn, never --- src/share/vm/c1/c1_GraphBuilder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/share/vm/c1/c1_GraphBuilder.cpp b/src/share/vm/c1/c1_GraphBuilder.cpp index ac0cea708..c734a7729 100644 --- a/src/share/vm/c1/c1_GraphBuilder.cpp +++ b/src/share/vm/c1/c1_GraphBuilder.cpp @@ -1306,6 +1306,7 @@ void GraphBuilder::table_switch() { if (sw.dest_offset_at(i) < 0) has_bb = true; } // add default successor + if (sw.default_offset() < 0) has_bb = true; sux->at_put(i, block_at(bci() + sw.default_offset())); ValueStack* state_before = has_bb ? copy_state_before() : NULL; Instruction* res = append(new TableSwitch(ipop(), sux, sw.low_key(), state_before, has_bb)); @@ -1350,6 +1351,7 @@ void GraphBuilder::lookup_switch() { keys->at_put(i, pair.match()); } // add default successor + if (sw.default_offset() < 0) has_bb = true; sux->at_put(i, block_at(bci() + sw.default_offset())); ValueStack* state_before = has_bb ? copy_state_before() : NULL; Instruction* res = append(new LookupSwitch(ipop(), sux, keys, state_before, has_bb)); -- GitLab