| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 trydart.poi; | 5 library trydart.poi; |
| 6 | 6 |
| 7 import 'dart:async' show | 7 import 'dart:async' show |
| 8 Completer, | 8 Completer, |
| 9 Future; | 9 Future; |
| 10 | 10 |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 } | 531 } |
| 532 | 532 |
| 533 class ScriptOnlyFilter implements QueueFilter { | 533 class ScriptOnlyFilter implements QueueFilter { |
| 534 final Uri script; | 534 final Uri script; |
| 535 | 535 |
| 536 ScriptOnlyFilter(this.script); | 536 ScriptOnlyFilter(this.script); |
| 537 | 537 |
| 538 bool checkNoEnqueuedInvokedInstanceMethods(Enqueuer enqueuer) => true; | 538 bool checkNoEnqueuedInvokedInstanceMethods(Enqueuer enqueuer) => true; |
| 539 | 539 |
| 540 void processWorkItem(void f(WorkItem work), WorkItem work) { | 540 void processWorkItem(void f(WorkItem work), WorkItem work) { |
| 541 if (work.element.library.canonicalUri == script) { | 541 if (work.element.library.canonicalUri != script) { |
| 542 f(work); | 542 // TODO(ahe): Rather nasty hack to work around another nasty hack in |
| 543 printWallClock('Processed ${work.element}.'); | 543 // backend.dart. Find better solution. |
| 544 } else { | 544 if (work.element.name != 'closureFromTearOff') { |
| 545 printWallClock('Skipped ${work.element}.'); | 545 printWallClock('Skipped ${work.element}.'); |
| 546 return; |
| 547 } |
| 546 } | 548 } |
| 549 f(work); |
| 550 printWallClock('Processed ${work.element}.'); |
| 547 } | 551 } |
| 548 } | 552 } |
| 549 | 553 |
| 550 class PoiTask extends CompilerTask { | 554 class PoiTask extends CompilerTask { |
| 551 PoiTask(Compiler compiler) : super(compiler); | 555 PoiTask(Compiler compiler) : super(compiler); |
| 552 | 556 |
| 553 String get name => 'POI'; | 557 String get name => 'POI'; |
| 554 } | 558 } |
| OLD | NEW |