| Index: sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| diff --git a/sdk/lib/_internal/compiler/implementation/enqueue.dart b/sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| index 8d24ad2ee56f12254a7bbdd91bbb20756eb26820..e489fb187294d571ad7d413a97c685b2ec130e64 100644
|
| --- a/sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| +++ b/sdk/lib/_internal/compiler/implementation/enqueue.dart
|
| @@ -104,7 +104,6 @@ abstract class Enqueuer {
|
| */
|
| void addToWorkList(Element element) {
|
| assert(invariant(element, element.isDeclaration));
|
| - if (element.isForeign(compiler)) return;
|
| internalAddToWorkList(element);
|
| }
|
|
|
| @@ -614,7 +613,7 @@ class ResolutionEnqueuer extends Enqueuer {
|
| if (getCachedElements(element) != null) return;
|
| if (queueIsClosed) {
|
| throw new SpannableAssertionFailure(element,
|
| - "Resolution work list is closed.");
|
| + "Resolution work list is closed. Trying to add $element.");
|
| }
|
| compiler.world.registerUsedElement(element);
|
|
|
| @@ -681,11 +680,14 @@ class ResolutionEnqueuer extends Enqueuer {
|
| * The action is performed as part of the post-processing immediately after
|
| * the resolution queue has been closed. As a consequence, [action] must not
|
| * add elements to the resolution queue.
|
| + *
|
| + * The queue is processed in FIFO order.
|
| */
|
| void addPostProcessAction(Element element, PostProcessAction action) {
|
| if (queueIsClosed) {
|
| throw new SpannableAssertionFailure(element,
|
| - "Resolution work list is closed.");
|
| + "Resolution work list is closed. "
|
| + "Trying to add post process action for $element");
|
| }
|
| postQueue.add(new PostProcessTask(element, action));
|
| }
|
| @@ -720,13 +722,16 @@ class CodegenEnqueuer extends Enqueuer {
|
| member.isAbstract(compiler) || generatedCode.containsKey(member);
|
|
|
| void internalAddToWorkList(Element element) {
|
| + // Don't generate code for foreign elements.
|
| + if (element.isForeign(compiler)) return;
|
| +
|
| // Codegen inlines field initializers, so it does not need to add
|
| // individual fields in the work list.
|
| if (element.isField() && element.isInstanceMember()) return;
|
|
|
| if (queueIsClosed) {
|
| throw new SpannableAssertionFailure(element,
|
| - "Codegen work list is closed.");
|
| + "Codegen work list is closed. Trying to add $element");
|
| }
|
| CodegenWorkItem workItem = new CodegenWorkItem(
|
| element, itemCompilationContextCreator());
|
|
|