src/share/classes/com/sun/tools/javac/jvm/Gen.java

changeset 641
594b3c2ef585
parent 591
d1d7595fa824
child 700
7b413ac1a720
equal deleted inserted replaced
640:995bcdb9a41d 641:594b3c2ef585
1453 Env<GenContext> env, 1453 Env<GenContext> env,
1454 int startpc, int endpc, 1454 int startpc, int endpc,
1455 List<Integer> gaps) { 1455 List<Integer> gaps) {
1456 if (startpc != endpc) { 1456 if (startpc != endpc) {
1457 List<JCExpression> subClauses = TreeInfo.isMultiCatch(tree) ? 1457 List<JCExpression> subClauses = TreeInfo.isMultiCatch(tree) ?
1458 ((JCTypeDisjoint)tree.param.vartype).components : 1458 ((JCTypeDisjoint)tree.param.vartype).components :
1459 List.of(tree.param.vartype); 1459 List.of(tree.param.vartype);
1460 for (JCExpression subCatch : subClauses) { 1460 while (gaps.nonEmpty()) {
1461 int catchType = makeRef(tree.pos(), subCatch.type); 1461 for (JCExpression subCatch : subClauses) {
1462 List<Integer> lGaps = gaps; 1462 int catchType = makeRef(tree.pos(), subCatch.type);
1463 while (lGaps.nonEmpty()) { 1463 int end = gaps.head.intValue();
1464 int end = lGaps.head.intValue();
1465 registerCatch(tree.pos(), 1464 registerCatch(tree.pos(),
1466 startpc, end, code.curPc(), 1465 startpc, end, code.curPc(),
1467 catchType); 1466 catchType);
1468 lGaps = lGaps.tail;
1469 startpc = lGaps.head.intValue();
1470 lGaps = lGaps.tail;
1471 } 1467 }
1472 if (startpc < endpc) 1468 gaps = gaps.tail;
1469 startpc = gaps.head.intValue();
1470 gaps = gaps.tail;
1471 }
1472 if (startpc < endpc) {
1473 for (JCExpression subCatch : subClauses) {
1474 int catchType = makeRef(tree.pos(), subCatch.type);
1473 registerCatch(tree.pos(), 1475 registerCatch(tree.pos(),
1474 startpc, endpc, code.curPc(), 1476 startpc, endpc, code.curPc(),
1475 catchType); 1477 catchType);
1478 }
1476 } 1479 }
1477 VarSymbol exparam = tree.param.sym; 1480 VarSymbol exparam = tree.param.sym;
1478 code.statBegin(tree.pos); 1481 code.statBegin(tree.pos);
1479 code.markStatBegin(); 1482 code.markStatBegin();
1480 int limit = code.nextreg; 1483 int limit = code.nextreg;

mercurial