1.1 --- a/src/share/classes/com/sun/tools/javac/code/Symtab.java Thu Sep 16 09:57:37 2010 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Symtab.java Sat Sep 18 09:54:51 2010 -0700 1.3 @@ -74,6 +74,7 @@ 1.4 public final JCNoType voidType = new JCNoType(TypeTags.VOID); 1.5 1.6 private final Names names; 1.7 + private final Scope.ScopeCounter scopeCounter; 1.8 private final ClassReader reader; 1.9 private final Target target; 1.10 1.11 @@ -340,6 +341,7 @@ 1.12 context.put(symtabKey, this); 1.13 1.14 names = Names.instance(context); 1.15 + scopeCounter = Scope.ScopeCounter.instance(context); 1.16 target = Target.instance(context); 1.17 1.18 // Create the unknown type 1.19 @@ -386,7 +388,7 @@ 1.20 1.21 // Create class to hold all predefined constants and operations. 1.22 predefClass = new ClassSymbol(PUBLIC|ACYCLIC, names.empty, rootPackage); 1.23 - Scope scope = new Scope(predefClass); 1.24 + Scope scope = new Scope.ClassScope(predefClass, scopeCounter); 1.25 predefClass.members_field = scope; 1.26 1.27 // Enter symbols for basic types. 1.28 @@ -476,7 +478,7 @@ 1.29 proprietarySymbol.completer = null; 1.30 proprietarySymbol.flags_field = PUBLIC|ACYCLIC|ANNOTATION|INTERFACE; 1.31 proprietarySymbol.erasure_field = proprietaryType; 1.32 - proprietarySymbol.members_field = new Scope(proprietarySymbol); 1.33 + proprietarySymbol.members_field = new Scope.ClassScope(proprietarySymbol, scopeCounter); 1.34 proprietaryType.typarams_field = List.nil(); 1.35 proprietaryType.allparams_field = List.nil(); 1.36 proprietaryType.supertype_field = annotationType; 1.37 @@ -488,7 +490,7 @@ 1.38 ClassType arrayClassType = (ClassType)arrayClass.type; 1.39 arrayClassType.supertype_field = objectType; 1.40 arrayClassType.interfaces_field = List.of(cloneableType, serializableType); 1.41 - arrayClass.members_field = new Scope(arrayClass); 1.42 + arrayClass.members_field = new Scope.ClassScope(arrayClass, scopeCounter); 1.43 lengthVar = new VarSymbol( 1.44 PUBLIC | FINAL, 1.45 names.length,