| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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('mirrors'); | 5 #library('mirrors'); |
| 6 | 6 |
| 7 #import('dart:io'); | 7 #import('dart:io'); |
| 8 #import('dart:uri'); | 8 #import('dart:uri'); |
| 9 | 9 |
| 10 // TODO(rnystrom): Use "package:" URL (#4968). | 10 // TODO(rnystrom): Use "package:" URL (#4968). |
| 11 #import('src/mirrors/dart2js_mirror.dart'); | 11 #import('src/mirrors/dart2js_mirror.dart'); |
| 12 | 12 |
| 13 /** | 13 /** |
| 14 * [Compilation] encapsulates the compilation of a program. | 14 * [Compilation] encapsulates the compilation of a program. |
| 15 */ | 15 */ |
| 16 class Compilation { | 16 abstract class Compilation { |
| 17 /** | 17 /** |
| 18 * Creates a new compilation which has [script] as its entry point. | 18 * Creates a new compilation which has [script] as its entry point. |
| 19 */ | 19 */ |
| 20 factory Compilation(Path script, | 20 factory Compilation(Path script, |
| 21 Path libraryRoot, | 21 Path libraryRoot, |
| 22 [Path packageRoot, | 22 [Path packageRoot, |
| 23 List<String> opts = const <String>[]]) { | 23 List<String> opts = const <String>[]]) { |
| 24 return new Dart2JsCompilation(script, libraryRoot, packageRoot, opts); | 24 return new Dart2JsCompilation(script, libraryRoot, packageRoot, opts); |
| 25 } | 25 } |
| 26 | 26 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 38 } | 38 } |
| 39 | 39 |
| 40 /** | 40 /** |
| 41 * Returns the mirror system for this compilation. | 41 * Returns the mirror system for this compilation. |
| 42 */ | 42 */ |
| 43 final MirrorSystem mirrors; | 43 final MirrorSystem mirrors; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * Returns a future for the compiled JavaScript code. | 46 * Returns a future for the compiled JavaScript code. |
| 47 */ | 47 */ |
| 48 abstract Future<String> compileToJavaScript(); | 48 Future<String> compileToJavaScript(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 * The main interface for the whole mirror system. | 52 * The main interface for the whole mirror system. |
| 53 */ | 53 */ |
| 54 abstract class MirrorSystem { | 54 abstract class MirrorSystem { |
| 55 /** | 55 /** |
| 56 * Returns an unmodifiable map of all libraries in this mirror system. | 56 * Returns an unmodifiable map of all libraries in this mirror system. |
| 57 */ | 57 */ |
| 58 Map<String, LibraryMirror> get libraries; | 58 Map<String, LibraryMirror> get libraries; |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 500 /** | 500 /** |
| 501 * Returns the URI where the source originated. | 501 * Returns the URI where the source originated. |
| 502 */ | 502 */ |
| 503 Uri get uri; | 503 Uri get uri; |
| 504 | 504 |
| 505 /** | 505 /** |
| 506 * Returns the text of this source. | 506 * Returns the text of this source. |
| 507 */ | 507 */ |
| 508 String get text; | 508 String get text; |
| 509 } | 509 } |
| OLD | NEW |