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 'ticker.dart' show Ticker; | 10 import 'ticker.dart' show Ticker; |
10 | 11 |
11 import 'dart:io' show exitCode; | 12 import 'dart:io' show exitCode; |
12 | 13 |
13 import 'compiler_command_line.dart' show CompilerCommandLine; | 14 import 'compiler_command_line.dart' show CompilerCommandLine; |
14 | 15 |
15 import 'compiler_context.dart' show CompilerContext; | 16 import 'compiler_context.dart' show CompilerContext; |
16 | 17 |
17 import 'errors.dart' show InputError; | 18 import 'errors.dart' show InputError; |
18 | 19 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); | 73 DillTarget dillTarget = new DillTarget(ticker, uriTranslator); |
73 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, | 74 KernelTarget kernelTarget = new KernelTarget(c.fileSystem, dillTarget, |
74 uriTranslator, c.options.strongMode, c.uriToSource); | 75 uriTranslator, c.options.strongMode, c.uriToSource); |
75 | 76 |
76 kernelTarget.read(Uri.parse("dart:core")); | 77 kernelTarget.read(Uri.parse("dart:core")); |
77 await dillTarget.buildOutlines(); | 78 await dillTarget.buildOutlines(); |
78 await kernelTarget.buildOutlines(); | 79 await kernelTarget.buildOutlines(); |
79 await kernelTarget.writeOutline(outlineOutput); | 80 await kernelTarget.writeOutline(outlineOutput); |
80 | 81 |
81 if (exitCode != 0) return null; | 82 if (exitCode != 0) return null; |
82 await kernelTarget.buildProgram(); | 83 var program = await kernelTarget.buildProgram(); |
83 await kernelTarget.writeProgram(fullOutput, | 84 if (c.options.dumpIr) printProgramText(program); |
84 dumpIr: c.options.dumpIr, verify: c.options.verify); | 85 await kernelTarget.writeProgram(fullOutput, verify: c.options.verify); |
85 await kernelTarget.writeDepsFile(fullOutput, deps); | 86 await kernelTarget.writeDepsFile(fullOutput, deps); |
86 } | 87 } |
OLD | NEW |