| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 import 'dart:collection' show HashSet, Queue; | 5 import 'dart:collection' show HashSet, Queue; |
| 6 import 'dart:convert' show JSON; | 6 import 'dart:convert' show JSON; |
| 7 import 'dart:io' show File; | 7 import 'dart:io' show File; |
| 8 | 8 |
| 9 import 'package:analyzer/analyzer.dart' | 9 import 'package:analyzer/analyzer.dart' |
| 10 show AnalysisError, CompilationUnit, ErrorSeverity; | 10 show AnalysisError, CompilationUnit, ErrorSeverity; |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 | 259 |
| 260 /// Hoist types from class signatures | 260 /// Hoist types from class signatures |
| 261 final bool hoistSignatureTypes; | 261 final bool hoistSignatureTypes; |
| 262 | 262 |
| 263 /// Name types in type tests | 263 /// Name types in type tests |
| 264 final bool nameTypeTests; | 264 final bool nameTypeTests; |
| 265 | 265 |
| 266 /// Hoist types in type tests | 266 /// Hoist types in type tests |
| 267 final bool hoistTypeTests; | 267 final bool hoistTypeTests; |
| 268 | 268 |
| 269 // TODO(kevmoo): Remove once https://github.com/dart-lang/sdk/issues/27255 |
| 270 // is fixed. |
| 269 final bool useAngular2Whitelist; | 271 final bool useAngular2Whitelist; |
| 270 | 272 |
| 271 /// Enable ES6 destructuring of named parameters. Off by default. | 273 /// Enable ES6 destructuring of named parameters. Off by default. |
| 272 /// | 274 /// |
| 273 /// Older V8 versions do not accept default values with destructuring in | 275 /// Older V8 versions do not accept default values with destructuring in |
| 274 /// arrow functions yet (e.g. `({a} = {}) => 1`) but happily accepts them | 276 /// arrow functions yet (e.g. `({a} = {}) => 1`) but happily accepts them |
| 275 /// with regular functions (e.g. `function({a} = {}) { return 1 }`). | 277 /// with regular functions (e.g. `function({a} = {}) { return 1 }`). |
| 276 /// | 278 /// |
| 277 /// Supporting the syntax: | 279 /// Supporting the syntax: |
| 278 /// * Chrome Canary (51) | 280 /// * Chrome Canary (51) |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 defaultsTo: true, | 370 defaultsTo: true, |
| 369 hide: hide) | 371 hide: hide) |
| 370 ..addFlag('hoist-signature-types', | 372 ..addFlag('hoist-signature-types', |
| 371 help: 'Hoist types from class signatures', | 373 help: 'Hoist types from class signatures', |
| 372 defaultsTo: false, | 374 defaultsTo: false, |
| 373 hide: hide) | 375 hide: hide) |
| 374 ..addFlag('name-type-tests', | 376 ..addFlag('name-type-tests', |
| 375 help: 'Name types used in type tests', defaultsTo: true, hide: hide) | 377 help: 'Name types used in type tests', defaultsTo: true, hide: hide) |
| 376 ..addFlag('hoist-type-tests', | 378 ..addFlag('hoist-type-tests', |
| 377 help: 'Hoist types used in type tests', defaultsTo: true, hide: hide) | 379 help: 'Hoist types used in type tests', defaultsTo: true, hide: hide) |
| 380 // TODO(kevmoo): Remove once https://github.com/dart-lang/sdk/issues/27255 |
| 381 // is fixed. |
| 378 ..addFlag('unsafe-angular2-whitelist', defaultsTo: false, hide: hide) | 382 ..addFlag('unsafe-angular2-whitelist', defaultsTo: false, hide: hide) |
| 379 ..addOption('bazel-mapping', | 383 ..addOption('bazel-mapping', |
| 380 help: | 384 help: |
| 381 '--bazel-mapping=genfiles/to/library.dart,to/library.dart uses \n' | 385 '--bazel-mapping=genfiles/to/library.dart,to/library.dart uses \n' |
| 382 'to/library.dart as the path for library.dart in source maps.', | 386 'to/library.dart as the path for library.dart in source maps.', |
| 383 allowMultiple: true, | 387 allowMultiple: true, |
| 384 splitCommas: false, | 388 splitCommas: false, |
| 385 hide: hide) | 389 hide: hide) |
| 386 ..addOption('summary-out', | 390 ..addOption('summary-out', |
| 387 help: 'location to write the summary file', hide: hide); | 391 help: 'location to write the summary file', hide: hide); |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 /// Strip out files that should not be included in the sdk sourcemap as they | 605 /// Strip out files that should not be included in the sdk sourcemap as they |
| 602 /// are implementation details that would just confuse users. | 606 /// are implementation details that would just confuse users. |
| 603 /// Normalize sdk urls to use "dart:" for more understandable stack traces. | 607 /// Normalize sdk urls to use "dart:" for more understandable stack traces. |
| 604 Map cleanupSdkSourcemap(Map sourceMap) { | 608 Map cleanupSdkSourcemap(Map sourceMap) { |
| 605 var map = new Map.from(sourceMap); | 609 var map = new Map.from(sourceMap); |
| 606 map['sources'] = map['sources'] | 610 map['sources'] = map['sources'] |
| 607 .map((url) => url.contains('/_internal/') ? null : url) | 611 .map((url) => url.contains('/_internal/') ? null : url) |
| 608 .toList(); | 612 .toList(); |
| 609 return map; | 613 return map; |
| 610 } | 614 } |
| OLD | NEW |