OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 /// Command line tool to merge the SDK libraries and our patch files. | 6 /// Command line tool to merge the SDK libraries and our patch files. |
7 /// This is currently designed as an offline tool, but we could automate it. | 7 /// This is currently designed as an offline tool, but we could automate it. |
8 | 8 |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:async'; | 10 import 'dart:async'; |
11 import 'dart:math' as math; | 11 import 'dart:math' as math; |
12 | 12 |
13 import 'package:analyzer/analyzer.dart'; | 13 import 'package:analyzer/analyzer.dart'; |
14 import 'package:analyzer/src/generated/sdk.dart'; | 14 import 'package:analyzer/src/generated/sdk.dart'; |
15 import 'package:path/path.dart' as path; | 15 import 'package:path/path.dart' as path; |
16 import 'package:front_end/src/fasta/compile_platform.dart' as compile_platform; | 16 import 'package:front_end/src/fasta/compile_platform.dart' as compile_platform; |
17 | 17 |
18 import 'package:front_end/src/fasta/outline.dart' show CompileTask; | 18 import 'package:front_end/src/fasta/fasta.dart' show CompileTask; |
19 | 19 |
20 import 'package:front_end/src/fasta/compiler_command_line.dart' | 20 import 'package:front_end/src/fasta/compiler_command_line.dart' |
21 show CompilerCommandLine; | 21 show CompilerCommandLine; |
22 | 22 |
23 import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext; | 23 import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext; |
24 | 24 |
25 import 'package:front_end/src/fasta/ticker.dart' show Ticker; | 25 import 'package:front_end/src/fasta/ticker.dart' show Ticker; |
26 | 26 |
27 /// Set of input files that were read by this script to generate patched SDK. | 27 /// Set of input files that were read by this script to generate patched SDK. |
28 /// We will dump it out into the depfile for ninja to use. | 28 /// We will dump it out into the depfile for ninja to use. |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 if (diff != 0) return diff; | 606 if (diff != 0) return diff; |
607 return end - other.end; | 607 return end - other.end; |
608 } | 608 } |
609 } | 609 } |
610 | 610 |
611 List<SdkLibrary> _getSdkLibraries(String contents) { | 611 List<SdkLibrary> _getSdkLibraries(String contents) { |
612 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(true); | 612 var libraryBuilder = new SdkLibrariesReader_LibraryBuilder(true); |
613 parseCompilationUnit(contents).accept(libraryBuilder); | 613 parseCompilationUnit(contents).accept(libraryBuilder); |
614 return libraryBuilder.librariesMap.sdkLibraries; | 614 return libraryBuilder.librariesMap.sdkLibraries; |
615 } | 615 } |
OLD | NEW |