1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java Mon Nov 14 08:09:47 2011 -0800 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java Mon Nov 14 15:11:10 2011 -0800 1.3 @@ -40,6 +40,7 @@ 1.4 import com.sun.tools.javac.code.Type.*; 1.5 1.6 import com.sun.tools.javac.jvm.Target; 1.7 +import com.sun.tools.javac.parser.EndPosTable; 1.8 1.9 import static com.sun.tools.javac.code.Flags.*; 1.10 import static com.sun.tools.javac.code.Flags.BLOCK; 1.11 @@ -127,7 +128,7 @@ 1.12 1.13 /** A hash table mapping syntax trees to their ending source positions. 1.14 */ 1.15 - Map<JCTree, Integer> endPositions; 1.16 + EndPosTable endPosTable; 1.17 1.18 /************************************************************************** 1.19 * Global mappings 1.20 @@ -2195,9 +2196,8 @@ 1.21 } else { 1.22 make_at(tree.pos()); 1.23 T result = super.translate(tree); 1.24 - if (endPositions != null && result != tree) { 1.25 - Integer endPos = endPositions.remove(tree); 1.26 - if (endPos != null) endPositions.put(result, endPos); 1.27 + if (endPosTable != null && result != tree) { 1.28 + endPosTable.replaceTree(tree, result); 1.29 } 1.30 return result; 1.31 } 1.32 @@ -3675,7 +3675,7 @@ 1.33 try { 1.34 attrEnv = env; 1.35 this.make = make; 1.36 - endPositions = env.toplevel.endPositions; 1.37 + endPosTable = env.toplevel.endPositions; 1.38 currentClass = null; 1.39 currentMethodDef = null; 1.40 outermostClassDef = (cdef.hasTag(CLASSDEF)) ? (JCClassDecl)cdef : null; 1.41 @@ -3704,7 +3704,7 @@ 1.42 // note that recursive invocations of this method fail hard 1.43 attrEnv = null; 1.44 this.make = null; 1.45 - endPositions = null; 1.46 + endPosTable = null; 1.47 currentClass = null; 1.48 currentMethodDef = null; 1.49 outermostClassDef = null;