Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2186)

Unified Diff: pkg/compiler/lib/src/compiler.dart

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 2033f8271b39186646435ec2b7acf465c7f062e9..795b81c55e805af8bd51ca2abc9fbc968b77dd9d 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -1170,8 +1170,8 @@ class _CompilerCommonElements implements CommonElements {
ClassElement get functionClass =>
_functionClass ??= _findRequired(coreLibrary, 'Function');
- Element _functionApplyMethod;
- Element get functionApplyMethod {
+ MethodElement _functionApplyMethod;
+ MethodElement get functionApplyMethod {
if (_functionApplyMethod == null) {
functionClass.ensureResolved(resolution);
_functionApplyMethod = functionClass.lookupLocalMember('apply');
@@ -1181,7 +1181,7 @@ class _CompilerCommonElements implements CommonElements {
return _functionApplyMethod;
}
- bool isFunctionApplyMethod(Element element) =>
+ bool isFunctionApplyMethod(MemberElement element) =>
element.name == 'apply' && element.enclosingClass == functionClass;
ClassElement _nullClass;
@@ -1229,8 +1229,8 @@ class _CompilerCommonElements implements CommonElements {
ClassElement get resourceClass =>
_resourceClass ??= _findRequired(coreLibrary, 'Resource');
- Element _identicalFunction;
- Element get identicalFunction =>
+ MethodElement _identicalFunction;
+ MethodElement get identicalFunction =>
_identicalFunction ??= coreLibrary.find('identical');
// From dart:async
@@ -1254,7 +1254,7 @@ class _CompilerCommonElements implements CommonElements {
_mirrorSystemClass ??= _findRequired(mirrorsLibrary, 'MirrorSystem');
FunctionElement _mirrorSystemGetNameFunction;
- bool isMirrorSystemGetNameFunction(Element element) {
+ bool isMirrorSystemGetNameFunction(MemberElement element) {
if (_mirrorSystemGetNameFunction == null) {
if (!element.isFunction || mirrorsLibrary == null) return false;
ClassElement cls = mirrorSystemClass;
@@ -1479,15 +1479,15 @@ class _CompilerCommonElements implements CommonElements {
// TODO(johnniwinther): Change types to `ClassElement` when these are not
// called with unrelated elements.
- bool isNumberOrStringSupertype(/*Class*/ Element element) {
+ bool isNumberOrStringSupertype(/*Class*/ Entity element) {
return element == coreLibrary.find('Comparable');
}
- bool isStringOnlySupertype(/*Class*/ Element element) {
+ bool isStringOnlySupertype(/*Class*/ Entity element) {
return element == coreLibrary.find('Pattern');
}
- bool isListSupertype(/*Class*/ Element element) => element == iterableClass;
+ bool isListSupertype(/*Class*/ Entity element) => element == iterableClass;
}
class CompilerDiagnosticReporter extends DiagnosticReporter {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/constants/expressions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698