| 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * If true, print a warning for each method that was resolved, but not | 8 * If true, print a warning for each method that was resolved, but not |
| 9 * compiled. | 9 * compiled. |
| 10 */ | 10 */ |
| (...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 assert(invariant(element, element.isDeclaration)); | 888 assert(invariant(element, element.isDeclaration)); |
| 889 TreeElements elements = enqueuer.resolution.getCachedElements(element); | 889 TreeElements elements = enqueuer.resolution.getCachedElements(element); |
| 890 if (elements != null) return elements; | 890 if (elements != null) return elements; |
| 891 assert(parser != null); | 891 assert(parser != null); |
| 892 Node tree = parser.parse(element); | 892 Node tree = parser.parse(element); |
| 893 validator.validate(tree); | 893 validator.validate(tree); |
| 894 elements = resolver.resolve(element); | 894 elements = resolver.resolve(element); |
| 895 if (elements != null) { | 895 if (elements != null) { |
| 896 // Only analyze nodes with a corresponding [TreeElements]. | 896 // Only analyze nodes with a corresponding [TreeElements]. |
| 897 checker.check(tree, elements); | 897 checker.check(tree, elements); |
| 898 typesTask.analyze(tree, elements); | |
| 899 } | 898 } |
| 900 return elements; | 899 return elements; |
| 901 } | 900 } |
| 902 | 901 |
| 903 TreeElements analyze(ResolutionWorkItem work, ResolutionEnqueuer world) { | 902 TreeElements analyze(ResolutionWorkItem work, ResolutionEnqueuer world) { |
| 904 assert(invariant(work.element, identical(world, enqueuer.resolution))); | 903 assert(invariant(work.element, identical(world, enqueuer.resolution))); |
| 905 assert(invariant(work.element, !work.isAnalyzed(), | 904 assert(invariant(work.element, !work.isAnalyzed(), |
| 906 message: 'Element ${work.element} has already been analyzed')); | 905 message: 'Element ${work.element} has already been analyzed')); |
| 907 if (progress.elapsedMilliseconds > 500) { | 906 if (progress.elapsedMilliseconds > 500) { |
| 908 // TODO(ahe): Add structured diagnostics to the compiler API and | 907 // TODO(ahe): Add structured diagnostics to the compiler API and |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1258 | 1257 |
| 1259 void close() {} | 1258 void close() {} |
| 1260 | 1259 |
| 1261 toString() => name; | 1260 toString() => name; |
| 1262 | 1261 |
| 1263 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1262 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1264 static NullSink outputProvider(String name, String extension) { | 1263 static NullSink outputProvider(String name, String extension) { |
| 1265 return new NullSink('$name.$extension'); | 1264 return new NullSink('$name.$extension'); |
| 1266 } | 1265 } |
| 1267 } | 1266 } |
| OLD | NEW |