| 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 dart2js.source_mirrors.analyze; | 5 library dart2js.source_mirrors.analyze; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'source_mirrors.dart'; | 9 import 'source_mirrors.dart'; |
| 10 import 'dart2js_mirrors.dart' show Dart2JsMirrorSystem; | 10 import 'dart2js_mirrors.dart' show Dart2JsMirrorSystem; |
| 11 import '../../compiler.dart' as api; | 11 import '../../compiler.dart' as api; |
| 12 import '../apiimpl.dart' as apiimpl; | 12 import '../apiimpl.dart' as apiimpl; |
| 13 import '../dart2jslib.dart' show Compiler; | 13 import '../compiler.dart' show Compiler; |
| 14 import '../old_to_new_api.dart'; | 14 import '../old_to_new_api.dart'; |
| 15 | 15 |
| 16 //------------------------------------------------------------------------------ | 16 //------------------------------------------------------------------------------ |
| 17 // Analysis entry point. | 17 // Analysis entry point. |
| 18 //------------------------------------------------------------------------------ | 18 //------------------------------------------------------------------------------ |
| 19 | 19 |
| 20 /** | 20 /** |
| 21 * Analyzes set of libraries and provides a mirror system which can be used for | 21 * Analyzes set of libraries and provides a mirror system which can be used for |
| 22 * static inspection of the source code. | 22 * static inspection of the source code. |
| 23 */ | 23 */ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 findPackages); | 66 findPackages); |
| 67 compiler.librariesToAnalyzeWhenRun = libraries; | 67 compiler.librariesToAnalyzeWhenRun = libraries; |
| 68 return compiler.run(null).then((bool success) { | 68 return compiler.run(null).then((bool success) { |
| 69 if (success && !compilationFailed) { | 69 if (success && !compilationFailed) { |
| 70 return new Dart2JsMirrorSystem(compiler); | 70 return new Dart2JsMirrorSystem(compiler); |
| 71 } else { | 71 } else { |
| 72 throw new StateError('Failed to create mirror system.'); | 72 throw new StateError('Failed to create mirror system.'); |
| 73 } | 73 } |
| 74 }); | 74 }); |
| 75 } | 75 } |
| OLD | NEW |