Index: pkg/compiler/lib/src/resolution/members.dart |
diff --git a/pkg/compiler/lib/src/resolution/members.dart b/pkg/compiler/lib/src/resolution/members.dart |
index d2ca86e0c7c10e1553e8092edf0f869619473947..efc6e0da4f5c9bd4f9d503a6de9b6a722a586e60 100644 |
--- a/pkg/compiler/lib/src/resolution/members.dart |
+++ b/pkg/compiler/lib/src/resolution/members.dart |
@@ -2623,12 +2623,12 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
// of parse errors to make [element] erroneous. Fix this! |
member.computeType(resolution); |
- if (member == resolution.mirrorSystemGetNameFunction && |
+ if (resolution.commonElements.isMirrorSystemGetNameFunction(member) && |
!resolution.mirrorUsageAnalyzerTask.hasMirrorUsage(enclosingElement)) { |
- reporter |
- .reportHintMessage(node.selector, MessageKind.STATIC_FUNCTION_BLOAT, { |
- 'class': resolution.mirrorSystemClass.name, |
- 'name': resolution.mirrorSystemGetNameFunction.name |
+ reporter.reportHintMessage( |
+ node.selector, MessageKind.STATIC_FUNCTION_BLOAT, { |
+ 'class': resolution.commonElements.mirrorSystemClass.name, |
+ 'name': member.name |
}); |
} |
@@ -2654,7 +2654,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
registry.registerStaticUse( |
new StaticUse.staticInvoke(semantics.element, callStructure)); |
handleForeignCall(node, semantics.element, callStructure); |
- if (method == resolution.identicalFunction && |
+ if (method == resolution.commonElements.identicalFunction && |
argumentsResult.isValidAsConstant) { |
result = new ConstantResult( |
node, |
@@ -3677,7 +3677,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
registry.registerTypeUse(new TypeUse.instantiation(redirectionTarget |
.enclosingClass.thisType |
.subst(type.typeArguments, targetClass.typeVariables))); |
- if (enclosingElement == resolution.symbolConstructor) { |
+ if (resolution.commonElements.isSymbolConstructor(enclosingElement)) { |
registry.registerFeature(Feature.SYMBOL_CONSTRUCTOR); |
} |
if (isValidAsConstant) { |
@@ -3887,7 +3887,8 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
if (node.isConst) { |
bool isValidAsConstant = !isInvalid && constructor.isConst; |
- if (constructor == resolution.symbolConstructor) { |
+ CommonElements commonElements = resolution.commonElements; |
+ if (commonElements.isSymbolConstructor(constructor)) { |
Node argumentNode = node.send.arguments.head; |
ConstantExpression constant = resolver.constantCompiler |
.compileNode(argumentNode, registry.mapping); |
@@ -3903,7 +3904,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
registry.registerConstSymbol(nameString); |
} |
} |
- } else if (constructor == resolution.mirrorsUsedConstructor) { |
+ } else if (commonElements.isMirrorsUsedConstructor(constructor)) { |
resolution.mirrorUsageAnalyzerTask.validate(node, registry.mapping); |
} |
@@ -3963,7 +3964,7 @@ class ResolverVisitor extends MappingVisitor<ResolutionResult> { |
analyzeConstantDeferred(node, onAnalyzed: onAnalyzed); |
} else { |
// Not constant. |
- if (constructor == resolution.symbolConstructor && |
+ if (resolution.commonElements.isSymbolConstructor(constructor) && |
!resolution.mirrorUsageAnalyzerTask |
.hasMirrorUsage(enclosingElement)) { |
reporter.reportHintMessage(node.newToken, MessageKind.NON_CONST_BLOAT, |