Index: pkg/compiler/lib/src/enqueue.dart |
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart |
index 9325653f7fbf34e3f9cab61fdae4e3c9e59f0a4e..55deafc40041e37bc820d40482c0e9de2f503e92 100644 |
--- a/pkg/compiler/lib/src/enqueue.dart |
+++ b/pkg/compiler/lib/src/enqueue.dart |
@@ -2,7 +2,50 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-part of dart2js; |
+library dart2js.enqueue; |
+ |
+import 'dart:collection' show |
+ Queue; |
+import 'dart2jslib.dart' show |
+ invariant, |
+ CodegenWorkItem, |
+ Compiler, |
+ CompilerTask, |
+ DeferredAction, |
+ DeferredTask, |
+ ItemCompilationContext, |
+ Registry, |
+ ResolutionWorkItem, |
+ WorkItem; |
+import 'dart_types.dart' show |
+ DartType, |
+ InterfaceType; |
+import 'elements/elements.dart' show |
+ AnalyzableElement, |
+ AstElement, |
+ ClassElement, |
+ ConstructorElement, |
+ Element, |
+ Elements, |
+ FunctionElement, |
+ LibraryElement, |
+ LocalFunctionElement, |
+ Member, |
+ MemberElement, |
+ MethodElement, |
+ TypedElement, |
+ TypedefElement; |
+import 'js/js.dart' as js; |
+import 'native/native.dart' as native; |
+import 'resolution/resolution.dart' show |
+ ResolverVisitor; |
+import 'tree/tree.dart' show |
+ Send; |
+import 'universe/universe.dart'; |
+import 'util/util.dart' show |
+ Link, |
+ Setlet, |
+ SpannableAssertionFailure; |
typedef ItemCompilationContext ItemCompilationContextCreator(); |
@@ -146,7 +189,7 @@ abstract class Enqueuer { |
if (!member.isInstanceMember) return; |
String memberName = member.name; |
- if (member.kind == ElementKind.FIELD) { |
+ if (member.isField) { |
// The obvious thing to test here would be "member.isNative", |
// however, that only works after metadata has been parsed/analyzed, |
// and that may not have happened yet. |
@@ -187,7 +230,7 @@ abstract class Enqueuer { |
addToWorkList(member); |
return; |
} |
- } else if (member.kind == ElementKind.FUNCTION) { |
+ } else if (member.isFunction) { |
FunctionElement function = member; |
function.computeType(compiler); |
if (function.name == Compiler.NO_SUCH_METHOD) { |
@@ -213,7 +256,7 @@ abstract class Enqueuer { |
addToWorkList(function); |
return; |
} |
- } else if (member.kind == ElementKind.GETTER) { |
+ } else if (member.isGetter) { |
FunctionElement getter = member; |
getter.computeType(compiler); |
if (universe.hasInvokedGetter(getter, compiler.world)) { |
@@ -226,7 +269,7 @@ abstract class Enqueuer { |
addToWorkList(getter); |
return; |
} |
- } else if (member.kind == ElementKind.SETTER) { |
+ } else if (member.isSetter) { |
FunctionElement setter = member; |
setter.computeType(compiler); |
if (universe.hasInvokedSetter(setter, compiler.world)) { |
@@ -599,7 +642,7 @@ abstract class Enqueuer { |
// Even in checked mode, type annotations for return type and argument |
// types do not imply type checks, so there should never be a check |
// against the type variable of a typedef. |
- assert(type.kind != TypeKind.TYPE_VARIABLE || |
+ assert(!type.isTypeVariable || |
!type.element.enclosingElement.isTypedef); |
} |