Index: sdk/lib/_internal/lib/js_mirrors.dart |
diff --git a/sdk/lib/_internal/lib/js_mirrors.dart b/sdk/lib/_internal/lib/js_mirrors.dart |
index 3b6989d350102c4713bf0dacc48c72ebf29333b5..0e85d11f0b7304b534c5f22389e1922ad57c9ca6 100644 |
--- a/sdk/lib/_internal/lib/js_mirrors.dart |
+++ b/sdk/lib/_internal/lib/js_mirrors.dart |
@@ -273,7 +273,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
List<JsMethodMirror> get _methods => _functionMirrors; |
- Map<Symbol, ClassMirror> get classes { |
+ Map<Symbol, ClassMirror> get __classes { |
if (_cachedClasses != null) return _cachedClasses; |
var result = new Map(); |
for (String className in _classes) { |
@@ -290,8 +290,8 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
InstanceMirror setField(Symbol fieldName, Object arg) { |
String name = n(fieldName); |
if (name.endsWith('=')) throw new ArgumentError(''); |
- var mirror = functions[s('$name=')]; |
- if (mirror == null) mirror = variables[fieldName]; |
+ var mirror = __functions[s('$name=')]; |
+ if (mirror == null) mirror = __variables[fieldName]; |
if (mirror == null) { |
// TODO(ahe): What receiver to use? |
throw new NoSuchMethodError(this, setterSymbol(fieldName), [arg], null); |
@@ -301,7 +301,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
} |
InstanceMirror getField(Symbol fieldName) { |
- JsMirror mirror = members[fieldName]; |
+ JsMirror mirror = __members[fieldName]; |
if (mirror == null) { |
// TODO(ahe): What receiver to use? |
throw new NoSuchMethodError(this, fieldName, [], null); |
@@ -315,7 +315,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
if (namedArguments != null && !namedArguments.isEmpty) { |
throw new UnsupportedError('Named arguments are not implemented.'); |
} |
- JsDeclarationMirror mirror = members[memberName]; |
+ JsDeclarationMirror mirror = __members[memberName]; |
if (mirror == null) { |
// TODO(ahe): What receiver to use? |
throw new NoSuchMethodError( |
@@ -383,7 +383,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
return _cachedFields = result; |
} |
- Map<Symbol, MethodMirror> get functions { |
+ Map<Symbol, MethodMirror> get __functions { |
if (_cachedFunctions != null) return _cachedFunctions; |
var result = new Map(); |
for (JsMethodMirror mirror in _functionMirrors) { |
@@ -393,7 +393,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
new UnmodifiableMapView<Symbol, MethodMirror>(result); |
} |
- Map<Symbol, MethodMirror> get getters { |
+ Map<Symbol, MethodMirror> get __getters { |
if (_cachedGetters != null) return _cachedGetters; |
var result = new Map(); |
// TODO(ahe): Implement this. |
@@ -401,7 +401,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
new UnmodifiableMapView<Symbol, MethodMirror>(result); |
} |
- Map<Symbol, MethodMirror> get setters { |
+ Map<Symbol, MethodMirror> get __setters { |
if (_cachedSetters != null) return _cachedSetters; |
var result = new Map(); |
// TODO(ahe): Implement this. |
@@ -409,7 +409,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
new UnmodifiableMapView<Symbol, MethodMirror>(result); |
} |
- Map<Symbol, VariableMirror> get variables { |
+ Map<Symbol, VariableMirror> get __variables { |
if (_cachedVariables != null) return _cachedVariables; |
var result = new Map(); |
for (JsVariableMirror mirror in _fields) { |
@@ -419,16 +419,16 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
new UnmodifiableMapView<Symbol, VariableMirror>(result); |
} |
- Map<Symbol, Mirror> get members { |
+ Map<Symbol, Mirror> get __members { |
if (_cachedMembers != null) return _cachedMembers; |
- Map<Symbol, Mirror> result = new Map.from(classes); |
+ Map<Symbol, Mirror> result = new Map.from(__classes); |
addToResult(Symbol key, Mirror value) { |
result[key] = value; |
} |
- functions.forEach(addToResult); |
- getters.forEach(addToResult); |
- setters.forEach(addToResult); |
- variables.forEach(addToResult); |
+ __functions.forEach(addToResult); |
+ __getters.forEach(addToResult); |
+ __setters.forEach(addToResult); |
+ __variables.forEach(addToResult); |
return _cachedMembers = new UnmodifiableMapView<Symbol, Mirror>(result); |
} |
@@ -438,7 +438,7 @@ class JsLibraryMirror extends JsDeclarationMirror with JsObjectMirror |
addToResult(Symbol key, Mirror value) { |
result[key] = value; |
} |
- members.forEach(addToResult); |
+ __members.forEach(addToResult); |
return _cachedDeclarations = |
new UnmodifiableMapView<Symbol, DeclarationMirror>(result); |
} |
@@ -661,15 +661,15 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror |
// TODO(ahe): Remove this method, only here to silence warning. |
get _mixin => mixin; |
- Map<Symbol, Mirror> get members => _mixin.members; |
+ Map<Symbol, Mirror> get __members => _mixin.__members; |
- Map<Symbol, MethodMirror> get methods => _mixin.methods; |
+ Map<Symbol, MethodMirror> get __methods => _mixin.__methods; |
- Map<Symbol, MethodMirror> get getters => _mixin.getters; |
+ Map<Symbol, MethodMirror> get __getters => _mixin.__getters; |
- Map<Symbol, MethodMirror> get setters => _mixin.setters; |
+ Map<Symbol, MethodMirror> get __setters => _mixin.__setters; |
- Map<Symbol, VariableMirror> get variables => _mixin.variables; |
+ Map<Symbol, VariableMirror> get __variables => _mixin.__variables; |
Map<Symbol, DeclarationMirror> get declarations => mixin.declarations; |
@@ -694,7 +694,7 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror |
List<ClassMirror> get superinterfaces => [mixin]; |
- Map<Symbol, MethodMirror> get constructors => _mixin.constructors; |
+ Map<Symbol, MethodMirror> get __constructors => _mixin.__constructors; |
InstanceMirror newInstance( |
Symbol constructorName, |
@@ -965,32 +965,32 @@ class JsTypeBoundClassMirror extends JsDeclarationMirror implements ClassMirror |
return _cachedMethods =_class._getMethodsWithOwner(this); |
} |
- Map<Symbol, MethodMirror> get methods { |
+ Map<Symbol, MethodMirror> get __methods { |
if (_cachedMethodsMap != null) return _cachedMethodsMap; |
return _cachedMethodsMap = new UnmodifiableMapView<Symbol, MethodMirror>( |
filterMethods(_methods)); |
} |
- Map<Symbol, MethodMirror> get constructors { |
+ Map<Symbol, MethodMirror> get __constructors { |
if (_cachedConstructors != null) return _cachedConstructors; |
return _cachedConstructors = |
new UnmodifiableMapView<Symbol, MethodMirror>( |
filterConstructors(_methods)); |
} |
- Map<Symbol, MethodMirror> get getters { |
+ Map<Symbol, MethodMirror> get __getters { |
if (_cachedGetters != null) return _cachedGetters; |
return _cachedGetters = new UnmodifiableMapView<Symbol, MethodMirror>( |
- filterGetters(_methods, variables)); |
+ filterGetters(_methods, __variables)); |
} |
- Map<Symbol, MethodMirror> get setters { |
+ Map<Symbol, MethodMirror> get __setters { |
if (_cachedSetters != null) return _cachedSetters; |
return _cachedSetters = new UnmodifiableMapView<Symbol, MethodMirror>( |
- filterSetters(_methods, variables)); |
+ filterSetters(_methods, __variables)); |
} |
- Map<Symbol, VariableMirror> get variables { |
+ Map<Symbol, VariableMirror> get __variables { |
if (_cachedVariables != null) return _cachedVariables; |
var result = new Map(); |
for (JsVariableMirror mirror in _class._getFieldsWithOwner(this)) { |
@@ -1000,18 +1000,18 @@ class JsTypeBoundClassMirror extends JsDeclarationMirror implements ClassMirror |
new UnmodifiableMapView<Symbol, VariableMirror>(result); |
} |
- Map<Symbol, DeclarationMirror> get members { |
+ Map<Symbol, DeclarationMirror> get __members { |
if (_cachedMembers != null) return _cachedMembers; |
return _cachedMembers = new UnmodifiableMapView<Symbol, DeclarationMirror>( |
- filterMembers(_methods, variables)); |
+ filterMembers(_methods, __variables)); |
} |
Map<Symbol, DeclarationMirror> get declarations { |
if (_cachedDeclarations != null) return _cachedDeclarations; |
Map<Symbol, DeclarationMirror> result = |
new Map<Symbol, DeclarationMirror>(); |
- result.addAll(members); |
- result.addAll(constructors); |
+ result.addAll(__members); |
+ result.addAll(__constructors); |
typeVariables.forEach((tv) => result[tv.simpleName] = tv); |
return _cachedDeclarations = |
new UnmodifiableMapView<Symbol, DeclarationMirror>(result); |
@@ -1119,7 +1119,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
} |
} |
- Map<Symbol, MethodMirror> get constructors { |
+ Map<Symbol, MethodMirror> get __constructors { |
if (_cachedConstructors != null) return _cachedConstructors; |
return _cachedConstructors = |
new UnmodifiableMapView<Symbol, MethodMirror>( |
@@ -1207,25 +1207,25 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
return _cachedFields = _getFieldsWithOwner(this); |
} |
- Map<Symbol, MethodMirror> get methods { |
+ Map<Symbol, MethodMirror> get __methods { |
if (_cachedMethodsMap != null) return _cachedMethodsMap; |
return _cachedMethodsMap = |
new UnmodifiableMapView<Symbol, MethodMirror>(filterMethods(_methods)); |
} |
- Map<Symbol, MethodMirror> get getters { |
+ Map<Symbol, MethodMirror> get __getters { |
if (_cachedGetters != null) return _cachedGetters; |
return _cachedGetters = new UnmodifiableMapView<Symbol, MethodMirror>( |
- filterGetters(_methods, variables)); |
+ filterGetters(_methods, __variables)); |
} |
- Map<Symbol, MethodMirror> get setters { |
+ Map<Symbol, MethodMirror> get __setters { |
if (_cachedSetters != null) return _cachedSetters; |
return _cachedSetters = new UnmodifiableMapView<Symbol, MethodMirror>( |
- filterSetters(_methods, variables)); |
+ filterSetters(_methods, __variables)); |
} |
- Map<Symbol, VariableMirror> get variables { |
+ Map<Symbol, VariableMirror> get __variables { |
if (_cachedVariables != null) return _cachedVariables; |
var result = new Map(); |
for (JsVariableMirror mirror in _fields) { |
@@ -1235,10 +1235,10 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
new UnmodifiableMapView<Symbol, VariableMirror>(result); |
} |
- Map<Symbol, Mirror> get members { |
+ Map<Symbol, Mirror> get __members { |
if (_cachedMembers != null) return _cachedMembers; |
return _cachedMembers = new UnmodifiableMapView<Symbol, Mirror>( |
- filterMembers(_methods, variables)); |
+ filterMembers(_methods, __variables)); |
} |
Map<Symbol, DeclarationMirror> get declarations { |
@@ -1247,15 +1247,15 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
addToResult(Symbol key, Mirror value) { |
result[key] = value; |
} |
- members.forEach(addToResult); |
- constructors.forEach(addToResult); |
+ __members.forEach(addToResult); |
+ __constructors.forEach(addToResult); |
typeVariables.forEach((tv) => result[tv.simpleName] = tv); |
return _cachedDeclarations = |
new UnmodifiableMapView<Symbol, DeclarationMirror>(result); |
} |
InstanceMirror setField(Symbol fieldName, Object arg) { |
- JsVariableMirror mirror = variables[fieldName]; |
+ JsVariableMirror mirror = __variables[fieldName]; |
if (mirror != null && mirror.isStatic && !mirror.isFinal) { |
// '$' (JS_CURRENT_ISOLATE()) stores state which is stored directly, so |
// we shouldn't use [JsLibraryMirror._globalObject] here. |
@@ -1271,7 +1271,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
} |
InstanceMirror getField(Symbol fieldName) { |
- JsVariableMirror mirror = variables[fieldName]; |
+ JsVariableMirror mirror = __variables[fieldName]; |
if (mirror != null && mirror.isStatic) { |
String jsName = mirror._jsName; |
// '$' (JS_CURRENT_ISOLATE()) stores state which is read directly, so |
@@ -1299,7 +1299,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
JsMethodMirror mirror = |
JsCache.fetch(_jsConstructorCache, n(constructorName)); |
if (mirror == null) { |
- mirror = constructors.values.firstWhere( |
+ mirror = __constructors.values.firstWhere( |
(m) => m.constructorName == constructorName, |
orElse: () { |
// TODO(ahe): What receiver to use? |
@@ -1321,7 +1321,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
// This will set _owner field on all clasess as a side |
// effect. This gives us a fast path to reflect on a |
// class without parsing reflection data. |
- library.classes; |
+ library.__classes; |
} |
} |
} |
@@ -1377,7 +1377,7 @@ class JsClassMirror extends JsTypeMirror with JsObjectMirror |
if (namedArguments != null && !namedArguments.isEmpty) { |
throw new UnsupportedError('Named arguments are not implemented.'); |
} |
- JsMethodMirror mirror = methods[memberName]; |
+ JsMethodMirror mirror = __methods[memberName]; |
if (mirror == null || !mirror.isStatic) { |
// TODO(ahe): What receiver to use? |
throw new NoSuchMethodError( |