1.1 --- a/src/share/classes/com/sun/tools/javac/code/Symtab.java Mon Jun 24 22:03:57 2013 -0400 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Symtab.java Tue Jun 25 16:12:53 2013 +0100 1.3 @@ -28,7 +28,6 @@ 1.4 import java.util.*; 1.5 1.6 import javax.lang.model.element.ElementVisitor; 1.7 -import javax.lang.model.type.TypeVisitor; 1.8 1.9 import com.sun.tools.javac.code.Symbol.*; 1.10 import com.sun.tools.javac.code.Type.*; 1.11 @@ -65,16 +64,16 @@ 1.12 1.13 /** Builtin types. 1.14 */ 1.15 - public final Type byteType = new Type(BYTE, null); 1.16 - public final Type charType = new Type(CHAR, null); 1.17 - public final Type shortType = new Type(SHORT, null); 1.18 - public final Type intType = new Type(INT, null); 1.19 - public final Type longType = new Type(LONG, null); 1.20 - public final Type floatType = new Type(FLOAT, null); 1.21 - public final Type doubleType = new Type(DOUBLE, null); 1.22 - public final Type booleanType = new Type(BOOLEAN, null); 1.23 + public final JCPrimitiveType byteType = new JCPrimitiveType(BYTE, null); 1.24 + public final JCPrimitiveType charType = new JCPrimitiveType(CHAR, null); 1.25 + public final JCPrimitiveType shortType = new JCPrimitiveType(SHORT, null); 1.26 + public final JCPrimitiveType intType = new JCPrimitiveType(INT, null); 1.27 + public final JCPrimitiveType longType = new JCPrimitiveType(LONG, null); 1.28 + public final JCPrimitiveType floatType = new JCPrimitiveType(FLOAT, null); 1.29 + public final JCPrimitiveType doubleType = new JCPrimitiveType(DOUBLE, null); 1.30 + public final JCPrimitiveType booleanType = new JCPrimitiveType(BOOLEAN, null); 1.31 public final Type botType = new BottomType(); 1.32 - public final JCNoType voidType = new JCNoType(VOID); 1.33 + public final JCVoidType voidType = new JCVoidType(); 1.34 1.35 private final Names names; 1.36 private final ClassReader reader; 1.37 @@ -208,7 +207,7 @@ 1.38 1.39 public void initType(Type type, ClassSymbol c) { 1.40 type.tsym = c; 1.41 - typeOfTag[type.tag.ordinal()] = type; 1.42 + typeOfTag[type.getTag().ordinal()] = type; 1.43 } 1.44 1.45 public void initType(Type type, String name) { 1.46 @@ -220,7 +219,7 @@ 1.47 1.48 public void initType(Type type, String name, String bname) { 1.49 initType(type, name); 1.50 - boxedName[type.tag.ordinal()] = names.fromString("java.lang." + bname); 1.51 + boxedName[type.getTag().ordinal()] = names.fromString("java.lang." + bname); 1.52 } 1.53 1.54 /** The class symbol that owns all predefined symbols. 1.55 @@ -330,7 +329,7 @@ 1.56 } 1.57 1.58 public void synthesizeBoxTypeIfMissing(final Type type) { 1.59 - ClassSymbol sym = reader.enterClass(boxedName[type.tag.ordinal()]); 1.60 + ClassSymbol sym = reader.enterClass(boxedName[type.getTag().ordinal()]); 1.61 final Completer completer = sym.completer; 1.62 if (completer != null) { 1.63 sym.completer = new Completer() { 1.64 @@ -388,12 +387,7 @@ 1.65 target = Target.instance(context); 1.66 1.67 // Create the unknown type 1.68 - unknownType = new Type(UNKNOWN, null) { 1.69 - @Override 1.70 - public <R, P> R accept(TypeVisitor<R, P> v, P p) { 1.71 - return v.visitUnknown(this, p); 1.72 - } 1.73 - }; 1.74 + unknownType = new UnknownType(); 1.75 1.76 // create the basic builtin symbols 1.77 rootPackage = new PackageSymbol(names.empty, null);