Chromium Code Reviews| 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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(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 = |
| 69 KernelTarget kernelTarget = new KernelTarget( | 69 new DillTarget(ticker, uriTranslator, c.options.targetDart2js); |
|
ahe
2017/04/27 13:34:34
If DillTarget needs to know about dart2js, we shou
Siggi Cherem (dart-lang)
2017/04/28 21:37:20
Done.
| |
| 70 dillTarget, uriTranslator, c.options.strongMode, c.uriToSource); | 70 KernelTarget kernelTarget = new KernelTarget(dillTarget, uriTranslator, |
| 71 c.options.strongMode, c.options.targetDart2js, c.uriToSource); | |
| 71 | 72 |
| 72 kernelTarget.read(Uri.parse("dart:core")); | 73 kernelTarget.read(Uri.parse("dart:core")); |
| 73 await dillTarget.writeOutline(null); | 74 await dillTarget.writeOutline(null); |
| 74 await kernelTarget.writeOutline(output); | 75 await kernelTarget.writeOutline(output); |
| 75 | 76 |
| 76 if (exitCode != 0) return null; | 77 if (exitCode != 0) return null; |
| 77 await kernelTarget.writeProgram(output, | 78 await kernelTarget.writeProgram(output, |
| 78 dumpIr: c.options.dumpIr, verify: c.options.verify); | 79 dumpIr: c.options.dumpIr, verify: c.options.verify); |
| 79 await kernelTarget.writeDepsFile(output, deps); | 80 await kernelTarget.writeDepsFile(output, deps); |
| 80 } | 81 } |
| OLD | NEW |