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

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

Issue 1284673003: Move dart2jslib parts into separate libraries. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix try. Created 5 years, 4 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 | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « pkg/compiler/lib/src/elements/modelx.dart ('k') | pkg/compiler/lib/src/helpers/helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698