src/share/classes/com/sun/tools/javac/comp/Flow.java

changeset 735
f2048d9c666e
parent 724
7755f47542a0
child 742
fdc67f5170e9
     1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Tue Nov 02 12:01:35 2010 +0000
     1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Nov 04 12:57:48 2010 +0000
     1.3 @@ -226,7 +226,7 @@
     1.4       */
     1.5      Bits uninits;
     1.6  
     1.7 -    HashMap<Symbol, List<Type>> multicatchTypes;
     1.8 +    HashMap<Symbol, List<Type>> preciseRethrowTypes;
     1.9  
    1.10      /** The set of variables that are definitely unassigned everywhere
    1.11       *  in current try block. This variable is maintained lazily; it is
    1.12 @@ -332,7 +332,7 @@
    1.13          if (!chk.isUnchecked(tree.pos(), exc)) {
    1.14              if (!chk.isHandled(exc, caught))
    1.15                  pendingExits.append(new PendingExit(tree, exc));
    1.16 -            thrown = chk.incl(exc, thrown);
    1.17 +                thrown = chk.incl(exc, thrown);
    1.18          }
    1.19      }
    1.20  
    1.21 @@ -1077,12 +1077,12 @@
    1.22              scan(param);
    1.23              inits.incl(param.sym.adr);
    1.24              uninits.excl(param.sym.adr);
    1.25 -            multicatchTypes.put(param.sym, chk.intersect(ctypes, rethrownTypes));
    1.26 +            preciseRethrowTypes.put(param.sym, chk.intersect(ctypes, rethrownTypes));
    1.27              scanStat(l.head.body);
    1.28              initsEnd.andSet(inits);
    1.29              uninitsEnd.andSet(uninits);
    1.30              nextadr = nextadrCatch;
    1.31 -            multicatchTypes.remove(param.sym);
    1.32 +            preciseRethrowTypes.remove(param.sym);
    1.33              aliveEnd |= alive;
    1.34          }
    1.35          if (tree.finalizer != null) {
    1.36 @@ -1215,10 +1215,10 @@
    1.37          Symbol sym = TreeInfo.symbol(tree.expr);
    1.38          if (sym != null &&
    1.39              sym.kind == VAR &&
    1.40 -            (sym.flags() & FINAL) != 0 &&
    1.41 -            multicatchTypes.get(sym) != null &&
    1.42 +            (sym.flags() & (FINAL | EFFECTIVELY_FINAL)) != 0 &&
    1.43 +            preciseRethrowTypes.get(sym) != null &&
    1.44              allowRethrowAnalysis) {
    1.45 -            for (Type t : multicatchTypes.get(sym)) {
    1.46 +            for (Type t : preciseRethrowTypes.get(sym)) {
    1.47                  markThrown(tree, t);
    1.48              }
    1.49          }
    1.50 @@ -1422,7 +1422,7 @@
    1.51              firstadr = 0;
    1.52              nextadr = 0;
    1.53              pendingExits = new ListBuffer<PendingExit>();
    1.54 -            multicatchTypes = new HashMap<Symbol, List<Type>>();
    1.55 +            preciseRethrowTypes = new HashMap<Symbol, List<Type>>();
    1.56              alive = true;
    1.57              this.thrown = this.caught = null;
    1.58              this.classDef = null;

mercurial