OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 /// A library for compiling Dart code and manipulating analyzer parse trees. | 5 /// A library for compiling Dart code and manipulating analyzer parse trees. |
6 library pub.dart; | 6 library pub.dart; |
7 | 7 |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 import 'dart:io'; | 9 import 'dart:io'; |
10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
11 | 11 |
12 import 'package:analyzer/analyzer.dart'; | 12 import 'package:analyzer/analyzer.dart'; |
13 import 'package:path/path.dart' as path; | 13 import 'package:path/path.dart' as path; |
14 | 14 |
15 import '../../../../../../pkg/compiler/lib/compiler.dart' as compiler; | 15 import '../../../compiler/compiler.dart' as compiler; |
16 import '../../../../../../pkg/compiler/lib/src/filenames.dart' show appendSlash; | 16 import '../../../compiler/implementation/filenames.dart' show appendSlash; |
17 | 17 |
18 import '../../asset/dart/serialize.dart'; | 18 import '../../asset/dart/serialize.dart'; |
19 import 'io.dart'; | 19 import 'io.dart'; |
20 import 'log.dart' as log; | 20 import 'log.dart' as log; |
21 | 21 |
22 /// Interface to communicate with dart2js. | 22 /// Interface to communicate with dart2js. |
23 /// | 23 /// |
24 /// This is basically an amalgamation of dart2js's | 24 /// This is basically an amalgamation of dart2js's |
25 /// [compiler.CompilerInputProvider], [compiler.CompilerOutputProvider], and | 25 /// [compiler.CompilerInputProvider], [compiler.CompilerOutputProvider], and |
26 /// [compiler.DiagnosticHandler] function types so that we can provide them | 26 /// [compiler.DiagnosticHandler] function types so that we can provide them |
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 message['message'], | 314 message['message'], |
315 packageRoot: packageRoot).then((_) => replyTo.send({ | 315 packageRoot: packageRoot).then((_) => replyTo.send({ |
316 'type': 'success' | 316 'type': 'success' |
317 })).catchError((e, stack) { | 317 })).catchError((e, stack) { |
318 replyTo.send({ | 318 replyTo.send({ |
319 'type': 'error', | 319 'type': 'error', |
320 'error': CrossIsolateException.serialize(e, stack) | 320 'error': CrossIsolateException.serialize(e, stack) |
321 }); | 321 }); |
322 }); | 322 }); |
323 } | 323 } |
OLD | NEW |