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 library fasta.compile_platform; | 5 library fasta.compile_platform; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import 'ticker.dart' show Ticker; | 9 import 'ticker.dart' show Ticker; |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 print("Note: strong mode support is preliminary and may not work."); | 55 print("Note: strong mode support is preliminary and may not work."); |
56 } | 56 } |
57 ticker.isVerbose = c.options.verbose; | 57 ticker.isVerbose = c.options.verbose; |
58 Uri deps = Uri.base.resolveUri(new Uri.file("${output.toFilePath()}.d")); | 58 Uri deps = Uri.base.resolveUri(new Uri.file("${output.toFilePath()}.d")); |
59 ticker.logMs("Parsed arguments"); | 59 ticker.logMs("Parsed arguments"); |
60 if (ticker.isVerbose) { | 60 if (ticker.isVerbose) { |
61 print("Compiling $patchedSdk to $output"); | 61 print("Compiling $patchedSdk to $output"); |
62 } | 62 } |
63 | 63 |
64 TranslateUri uriTranslator = | 64 TranslateUri uriTranslator = |
65 await TranslateUri.parse(patchedSdk, c.options.packages); | 65 await TranslateUri.parse(c.fileSystem, patchedSdk, c.options.packages); |
66 ticker.logMs("Read packages file"); | 66 ticker.logMs("Read packages file"); |
67 | 67 |
68 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); | 68 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); |
69 KernelTarget kernelTarget = new KernelTarget( | 69 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, |
70 dillTarget, uriTranslator, c.options.strongMode, c.uriToSource); | 70 uriTranslator, c.options.strongMode, c.uriToSource); |
71 | 71 |
72 kernelTarget.read(Uri.parse("dart:core")); | 72 kernelTarget.read(Uri.parse("dart:core")); |
73 await dillTarget.writeOutline(null); | 73 await dillTarget.writeOutline(null); |
74 await kernelTarget.writeOutline(output); | 74 await kernelTarget.writeOutline(output); |
75 | 75 |
76 if (exitCode != 0) return null; | 76 if (exitCode != 0) return null; |
77 await kernelTarget.writeProgram(output, | 77 await kernelTarget.writeProgram(output, |
78 dumpIr: c.options.dumpIr, verify: c.options.verify); | 78 dumpIr: c.options.dumpIr, verify: c.options.verify); |
79 await kernelTarget.writeDepsFile(output, deps); | 79 await kernelTarget.writeDepsFile(output, deps); |
80 } | 80 } |
OLD | NEW |