| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library dart2js.enqueue; | 5 library dart2js.enqueue; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import 'common/tasks.dart' show CompilerTask; | 9 import 'common/tasks.dart' show CompilerTask; |
| 10 import 'common/work.dart' show WorkItem; | 10 import 'common/work.dart' show WorkItem; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 | 39 |
| 40 EnqueueTask(Compiler compiler) | 40 EnqueueTask(Compiler compiler) |
| 41 : this.compiler = compiler, | 41 : this.compiler = compiler, |
| 42 super(compiler.measurer); | 42 super(compiler.measurer); |
| 43 | 43 |
| 44 // TODO(johnniwinther): Remove the need for this. | 44 // TODO(johnniwinther): Remove the need for this. |
| 45 bool get hasResolution => _resolution != null; | 45 bool get hasResolution => _resolution != null; |
| 46 | 46 |
| 47 // TODO(johnniwinther): Remove the need for this. | 47 // TODO(johnniwinther): Remove the need for this. |
| 48 ResolutionEnqueuer get resolution { | 48 ResolutionEnqueuer get resolution { |
| 49 assert(invariant(NO_LOCATION_SPANNABLE, _resolution != null, | 49 assert( |
| 50 message: "ResolutionEnqueuer has not been created yet.")); | 50 _resolution != null, |
| 51 failedAt(NO_LOCATION_SPANNABLE, |
| 52 "ResolutionEnqueuer has not been created yet.")); |
| 51 return _resolution; | 53 return _resolution; |
| 52 } | 54 } |
| 53 | 55 |
| 54 ResolutionEnqueuer createResolutionEnqueuer() { | 56 ResolutionEnqueuer createResolutionEnqueuer() { |
| 55 return _resolution ??= | 57 return _resolution ??= |
| 56 compiler.backend.createResolutionEnqueuer(this, compiler); | 58 compiler.backend.createResolutionEnqueuer(this, compiler); |
| 57 } | 59 } |
| 58 | 60 |
| 59 Enqueuer createCodegenEnqueuer(ClosedWorld closedWorld) { | 61 Enqueuer createCodegenEnqueuer(ClosedWorld closedWorld) { |
| 60 return compiler.backend.createCodegenEnqueuer(this, compiler, closedWorld); | 62 return compiler.backend.createCodegenEnqueuer(this, compiler, closedWorld); |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 final Entity element; | 594 final Entity element; |
| 593 final DeferredActionFunction action; | 595 final DeferredActionFunction action; |
| 594 | 596 |
| 595 DeferredAction(this.element, this.action); | 597 DeferredAction(this.element, this.action); |
| 596 } | 598 } |
| 597 | 599 |
| 598 /// Interface for creating work items for enqueued member entities. | 600 /// Interface for creating work items for enqueued member entities. |
| 599 abstract class WorkItemBuilder { | 601 abstract class WorkItemBuilder { |
| 600 WorkItem createWorkItem(MemberEntity entity); | 602 WorkItem createWorkItem(MemberEntity entity); |
| 601 } | 603 } |
| OLD | NEW |