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 /// This is an interface to the Dart Kernel parser and Kernel binary generator. | 5 /// This is an interface to the Dart Kernel parser and Kernel binary generator. |
6 /// | 6 /// |
7 /// It is used by the kernel-isolate to load Dart source code and generate | 7 /// It is used by the kernel-isolate to load Dart source code and generate |
8 /// Kernel binary format. | 8 /// Kernel binary format. |
9 /// | 9 /// |
10 /// This is either invoked as the root script of the Kernel isolate when used | 10 /// This is either invoked as the root script of the Kernel isolate when used |
11 /// as a part of | 11 /// as a part of |
12 /// | 12 /// |
13 /// dart --dfe=utils/kernel-service/kernel-service.dart ... | 13 /// dart --dfe=utils/kernel-service/kernel-service.dart ... |
14 /// | 14 /// |
15 /// invocation or it is invoked as a standalone script to perform training for | 15 /// invocation or it is invoked as a standalone script to perform training for |
16 /// the app-jit snapshot | 16 /// the app-jit snapshot |
17 /// | 17 /// |
18 /// dart utils/kernel-service/kernel-service.dart --train <source-file> | 18 /// dart utils/kernel-service/kernel-service.dart --train <source-file> |
19 /// | 19 /// |
20 /// | 20 /// |
21 library runtime.tools.kernel_service; | 21 library runtime.tools.kernel_service; |
22 | 22 |
23 import 'dart:async'; | 23 import 'dart:async'; |
24 import 'dart:convert'; | |
25 import 'dart:io'; | 24 import 'dart:io'; |
26 import 'dart:isolate'; | 25 import 'dart:isolate'; |
27 import 'dart:typed_data'; | 26 import 'dart:typed_data'; |
28 | 27 |
29 import 'package:kernel/binary/ast_to_binary.dart'; | 28 import 'package:kernel/binary/ast_to_binary.dart'; |
30 import 'package:kernel/kernel.dart'; | 29 import 'package:kernel/kernel.dart'; |
31 import 'package:kernel/target/targets.dart'; | 30 import 'package:kernel/target/targets.dart'; |
32 | 31 |
33 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget; | 32 import 'package:front_end/src/fasta/dill/dill_target.dart' show DillTarget; |
34 import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri; | 33 import 'package:front_end/src/fasta/translate_uri.dart' show TranslateUri; |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 if (await new File.fromUri(packagesFile).exists()) { | 270 if (await new File.fromUri(packagesFile).exists()) { |
272 return packagesFile; | 271 return packagesFile; |
273 } | 272 } |
274 if (dir.parent.path == dir.path) { | 273 if (dir.parent.path == dir.path) { |
275 break; | 274 break; |
276 } | 275 } |
277 dir = dir.parent; | 276 dir = dir.parent; |
278 } | 277 } |
279 return null; | 278 return null; |
280 } | 279 } |
OLD | NEW |