OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 /// API for compiling Dart source code to .dill (Kernel IR) files. | 5 /// API for compiling Dart source code to .dill (Kernel IR) files. |
6 library front_end.vm; | 6 library front_end.vm; |
7 // TODO(ahe): Convert this file to use the API in `../../kernel_generator.dart` | 7 // TODO(ahe): Convert this file to use the API in `../../kernel_generator.dart` |
8 // and `../../compiler_options.dart`. | 8 // and `../../compiler_options.dart`. |
9 | 9 |
10 import 'dart:async' show Future; | 10 import 'dart:async' show Future; |
11 | 11 |
12 import 'dart:io' show File, Platform; | 12 import 'dart:io' show File, Platform; |
13 | 13 |
14 import 'dart:typed_data' show Uint8List; | 14 import 'dart:typed_data' show Uint8List; |
15 | 15 |
| 16 import 'package:front_end/file_system.dart'; |
16 import 'package:front_end/physical_file_system.dart'; | 17 import 'package:front_end/physical_file_system.dart'; |
17 | 18 |
18 import 'fasta.dart' as fasta; | 19 import 'fasta.dart' as fasta; |
19 | 20 |
20 /// Compilation status codes. | 21 /// Compilation status codes. |
21 /// | 22 /// |
22 /// Note: The [index] property of these constants must match | 23 /// Note: The [index] property of these constants must match |
23 /// `Dart_KernelCompilationStatus` in | 24 /// `Dart_KernelCompilationStatus` in |
24 /// [dart_api.h](../../../../runtime/include/dart_api.h). | 25 /// [dart_api.h](../../../../runtime/include/dart_api.h). |
25 enum Status { | 26 enum Status { |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 if (await fileSystem.entityForUri(packagesFile).exists()) { | 153 if (await fileSystem.entityForUri(packagesFile).exists()) { |
153 return packagesFile; | 154 return packagesFile; |
154 } | 155 } |
155 if (dir.parent.path == dir.path) { | 156 if (dir.parent.path == dir.path) { |
156 break; | 157 break; |
157 } | 158 } |
158 dir = dir.parent; | 159 dir = dir.parent; |
159 } | 160 } |
160 return null; | 161 return null; |
161 } | 162 } |
OLD | NEW |