Mercurial > hg > graal-compiler
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 5925:4fabc16dc5bf
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
author | roland |
---|---|
date | Fri, 02 Mar 2012 16:04:24 +0100 |
parents | 80107dc493db |
children | e5f73be4c7f1 |
comparison
equal
deleted
inserted
replaced
5907:031df0387c09 | 5925:4fabc16dc5bf |
---|---|
1304 for (i = 0; i < l; i++) { | 1304 for (i = 0; i < l; i++) { |
1305 sux->at_put(i, block_at(bci() + sw.dest_offset_at(i))); | 1305 sux->at_put(i, block_at(bci() + sw.dest_offset_at(i))); |
1306 if (sw.dest_offset_at(i) < 0) has_bb = true; | 1306 if (sw.dest_offset_at(i) < 0) has_bb = true; |
1307 } | 1307 } |
1308 // add default successor | 1308 // add default successor |
1309 if (sw.default_offset() < 0) has_bb = true; | |
1309 sux->at_put(i, block_at(bci() + sw.default_offset())); | 1310 sux->at_put(i, block_at(bci() + sw.default_offset())); |
1310 ValueStack* state_before = has_bb ? copy_state_before() : NULL; | 1311 ValueStack* state_before = has_bb ? copy_state_before() : NULL; |
1311 Instruction* res = append(new TableSwitch(ipop(), sux, sw.low_key(), state_before, has_bb)); | 1312 Instruction* res = append(new TableSwitch(ipop(), sux, sw.low_key(), state_before, has_bb)); |
1312 #ifdef ASSERT | 1313 #ifdef ASSERT |
1313 if (res->as_Goto()) { | 1314 if (res->as_Goto()) { |
1348 if (pair.offset() < 0) has_bb = true; | 1349 if (pair.offset() < 0) has_bb = true; |
1349 sux->at_put(i, block_at(bci() + pair.offset())); | 1350 sux->at_put(i, block_at(bci() + pair.offset())); |
1350 keys->at_put(i, pair.match()); | 1351 keys->at_put(i, pair.match()); |
1351 } | 1352 } |
1352 // add default successor | 1353 // add default successor |
1354 if (sw.default_offset() < 0) has_bb = true; | |
1353 sux->at_put(i, block_at(bci() + sw.default_offset())); | 1355 sux->at_put(i, block_at(bci() + sw.default_offset())); |
1354 ValueStack* state_before = has_bb ? copy_state_before() : NULL; | 1356 ValueStack* state_before = has_bb ? copy_state_before() : NULL; |
1355 Instruction* res = append(new LookupSwitch(ipop(), sux, keys, state_before, has_bb)); | 1357 Instruction* res = append(new LookupSwitch(ipop(), sux, keys, state_before, has_bb)); |
1356 #ifdef ASSERT | 1358 #ifdef ASSERT |
1357 if (res->as_Goto()) { | 1359 if (res->as_Goto()) { |