| 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 'package:front_end/src/fasta/kernel/utils.dart'; | 9 import 'package:front_end/src/fasta/kernel/utils.dart'; |
| 10 import 'ticker.dart' show Ticker; | 10 import 'ticker.dart' show Ticker; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 TranslateUri uriTranslator = | 69 TranslateUri uriTranslator = |
| 70 await TranslateUri.parse(c.fileSystem, patchedSdk, c.options.packages); | 70 await TranslateUri.parse(c.fileSystem, patchedSdk, c.options.packages); |
| 71 ticker.logMs("Read packages file"); | 71 ticker.logMs("Read packages file"); |
| 72 | 72 |
| 73 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); | 73 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); |
| 74 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, | 74 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, |
| 75 uriTranslator, c.options.strongMode, c.uriToSource); | 75 uriTranslator, c.options.strongMode, c.uriToSource); |
| 76 | 76 |
| 77 kernelTarget.read(Uri.parse("dart:core")); | 77 kernelTarget.read(Uri.parse("dart:core")); |
| 78 await dillTarget.buildOutlines(); | 78 await dillTarget.buildOutlines(); |
| 79 await kernelTarget.buildOutlines(); | 79 var outline = await kernelTarget.buildOutlines(); |
| 80 await kernelTarget.writeOutline(outlineOutput); | 80 await writeProgramToFileUri(ticker, outlineOutput, outline, |
| 81 isFullProgram: false); |
| 81 | 82 |
| 82 if (exitCode != 0) return null; | 83 if (exitCode != 0) return null; |
| 84 |
| 83 var program = await kernelTarget.buildProgram(verify: c.options.verify); | 85 var program = await kernelTarget.buildProgram(verify: c.options.verify); |
| 84 if (c.options.dumpIr) printProgramText(program); | 86 if (c.options.dumpIr) printProgramText(program); |
| 85 await kernelTarget.writeProgram(fullOutput); | 87 await writeProgramToFileUri(ticker, fullOutput, program, isFullProgram: true); |
| 86 await kernelTarget.writeDepsFile(fullOutput, deps); | 88 await kernelTarget.writeDepsFile(fullOutput, deps); |
| 87 } | 89 } |
| OLD | NEW |