| 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; | |
| 14 | |
| 15 import 'package:compiler_unsupported/compiler.dart' as compiler; | 13 import 'package:compiler_unsupported/compiler.dart' as compiler; |
| 16 import 'package:compiler_unsupported/src/filenames.dart' | 14 import 'package:compiler_unsupported/src/filenames.dart' |
| 17 show appendSlash; | 15 show appendSlash; |
| 16 import 'package:path/path.dart' as path; |
| 18 | 17 |
| 19 import 'asset/dart/serialize.dart'; | 18 import 'asset/dart/serialize.dart'; |
| 20 import 'io.dart'; | 19 import 'io.dart'; |
| 21 import 'log.dart' as log; | 20 import 'log.dart' as log; |
| 22 | 21 |
| 23 /// Interface to communicate with dart2js. | 22 /// Interface to communicate with dart2js. |
| 24 /// | 23 /// |
| 25 /// This is basically an amalgamation of dart2js's | 24 /// This is basically an amalgamation of dart2js's |
| 26 /// [compiler.CompilerInputProvider], [compiler.CompilerOutputProvider], and | 25 /// [compiler.CompilerInputProvider], [compiler.CompilerOutputProvider], and |
| 27 /// [compiler.DiagnosticHandler] function types so that we can provide them | 26 /// [compiler.DiagnosticHandler] function types so that we can provide them |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 Isolate.spawnUri(Uri.parse(message['uri']), [], message['message'], | 215 Isolate.spawnUri(Uri.parse(message['uri']), [], message['message'], |
| 217 packageRoot: packageRoot) | 216 packageRoot: packageRoot) |
| 218 .then((_) => replyTo.send({'type': 'success'})) | 217 .then((_) => replyTo.send({'type': 'success'})) |
| 219 .catchError((e, stack) { | 218 .catchError((e, stack) { |
| 220 replyTo.send({ | 219 replyTo.send({ |
| 221 'type': 'error', | 220 'type': 'error', |
| 222 'error': CrossIsolateException.serialize(e, stack) | 221 'error': CrossIsolateException.serialize(e, stack) |
| 223 }); | 222 }); |
| 224 }); | 223 }); |
| 225 } | 224 } |
| OLD | NEW |