| 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 } | 448 } |
| 449 | 449 |
| 450 Future<Element> runPoiInternal( | 450 Future<Element> runPoiInternal( |
| 451 Compiler newCompiler, | 451 Compiler newCompiler, |
| 452 Stopwatch sw, | 452 Stopwatch sw, |
| 453 LibraryUpdater updater, | 453 LibraryUpdater updater, |
| 454 Uri uri, | 454 Uri uri, |
| 455 int position) { | 455 int position) { |
| 456 bool isFullCompile = cachedCompiler != newCompiler; | 456 bool isFullCompile = cachedCompiler != newCompiler; |
| 457 cachedCompiler = newCompiler; | 457 cachedCompiler = newCompiler; |
| 458 if (poiTask == null || poiTask.compiler != cachedCompiler) { | 458 if (poiTask == null) { |
| 459 poiTask = new PoiTask(cachedCompiler); | 459 poiTask = new PoiTask(cachedCompiler); |
| 460 cachedCompiler.tasks.add(poiTask); | 460 cachedCompiler.tasks.add(poiTask); |
| 461 } | 461 } |
| 462 | 462 |
| 463 if (!isFullCompile) { | 463 if (!isFullCompile) { |
| 464 printFormattedTime( | 464 printFormattedTime( |
| 465 'Analyzing changes and updating elements took', sw.elapsedMicroseconds); | 465 'Analyzing changes and updating elements took', sw.elapsedMicroseconds); |
| 466 } | 466 } |
| 467 sw.reset(); | 467 sw.reset(); |
| 468 | 468 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 f(work); | 562 f(work); |
| 563 printWallClock('Processed ${work.element}.'); | 563 printWallClock('Processed ${work.element}.'); |
| 564 } | 564 } |
| 565 } | 565 } |
| 566 | 566 |
| 567 class PoiTask extends CompilerTask { | 567 class PoiTask extends CompilerTask { |
| 568 PoiTask(Compiler compiler) : super(compiler.measurer); | 568 PoiTask(Compiler compiler) : super(compiler.measurer); |
| 569 | 569 |
| 570 String get name => 'POI'; | 570 String get name => 'POI'; |
| 571 } | 571 } |
| OLD | NEW |