| 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 |
| 11 import 'dart:io' as io; | 11 import 'dart:io' as io; |
| 12 | 12 |
| 13 import 'dart:convert' show | 13 import 'dart:convert' show |
| 14 UTF8; | 14 UTF8; |
| 15 | 15 |
| 16 import 'package:dart2js_incremental/dart2js_incremental.dart' show | 16 import 'package:dart2js_incremental/dart2js_incremental.dart' show |
| 17 INCREMENTAL_OPTIONS, |
| 17 reuseCompiler; | 18 reuseCompiler; |
| 18 | 19 |
| 19 import 'package:dart2js_incremental/library_updater.dart' show | 20 import 'package:dart2js_incremental/library_updater.dart' show |
| 20 LibraryUpdater; | 21 LibraryUpdater; |
| 21 | 22 |
| 22 import 'package:compiler/src/source_file_provider.dart' show | 23 import 'package:compiler/src/source_file_provider.dart' show |
| 23 FormattingDiagnosticHandler; | 24 FormattingDiagnosticHandler; |
| 24 | 25 |
| 25 import 'package:compiler/compiler.dart' as api; | 26 import 'package:compiler/compiler.dart' as api; |
| 26 | 27 |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 int position, | 379 int position, |
| 379 api.CompilerInputProvider inputProvider, | 380 api.CompilerInputProvider inputProvider, |
| 380 api.DiagnosticHandler handler) { | 381 api.DiagnosticHandler handler) { |
| 381 Stopwatch sw = new Stopwatch()..start(); | 382 Stopwatch sw = new Stopwatch()..start(); |
| 382 Uri libraryRoot = Uri.base.resolve('sdk/'); | 383 Uri libraryRoot = Uri.base.resolve('sdk/'); |
| 383 Uri packageRoot = Uri.base.resolveUri( | 384 Uri packageRoot = Uri.base.resolveUri( |
| 384 new Uri.file('${io.Platform.packageRoot}/')); | 385 new Uri.file('${io.Platform.packageRoot}/')); |
| 385 | 386 |
| 386 var options = [ | 387 var options = [ |
| 387 '--analyze-main', | 388 '--analyze-main', |
| 388 '--no-source-maps', | |
| 389 '--verbose', | 389 '--verbose', |
| 390 '--categories=Client,Server', | 390 '--categories=Client,Server', |
| 391 '--incremental-support', | |
| 392 '--disable-type-inference', | |
| 393 ]; | 391 ]; |
| 392 options.addAll(INCREMENTAL_OPTIONS); |
| 394 | 393 |
| 395 if (!isCompiler) { | 394 if (!isCompiler) { |
| 396 options.add('--analyze-only'); | 395 options.add('--analyze-only'); |
| 397 } | 396 } |
| 398 | 397 |
| 399 if (enableMinification) { | 398 if (enableMinification) { |
| 400 options.add('--minify'); | 399 options.add('--minify'); |
| 401 } | 400 } |
| 402 | 401 |
| 403 LibraryUpdater updater; | 402 LibraryUpdater updater; |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 printWallClock('Skipped ${work.element}.'); | 545 printWallClock('Skipped ${work.element}.'); |
| 547 } | 546 } |
| 548 } | 547 } |
| 549 } | 548 } |
| 550 | 549 |
| 551 class PoiTask extends CompilerTask { | 550 class PoiTask extends CompilerTask { |
| 552 PoiTask(Compiler compiler) : super(compiler); | 551 PoiTask(Compiler compiler) : super(compiler); |
| 553 | 552 |
| 554 String get name => 'POI'; | 553 String get name => 'POI'; |
| 555 } | 554 } |
| OLD | NEW |