| 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 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 log('Excess resolution work: ${resolved.length}.'); | 947 log('Excess resolution work: ${resolved.length}.'); |
| 948 for (Element e in resolved) { | 948 for (Element e in resolved) { |
| 949 SourceSpan span = spanFromElement(e); | 949 SourceSpan span = spanFromElement(e); |
| 950 reportDiagnostic(span, 'Warning: $e resolved but not compiled.', | 950 reportDiagnostic(span, 'Warning: $e resolved but not compiled.', |
| 951 api.Diagnostic.WARNING); | 951 api.Diagnostic.WARNING); |
| 952 } | 952 } |
| 953 } | 953 } |
| 954 | 954 |
| 955 TreeElements analyzeElement(Element element) { | 955 TreeElements analyzeElement(Element element) { |
| 956 assert(invariant(element, element.isDeclaration)); | 956 assert(invariant(element, element.isDeclaration)); |
| 957 assert(!element.isForwardingConstructor); |
| 957 TreeElements elements = enqueuer.resolution.getCachedElements(element); | 958 TreeElements elements = enqueuer.resolution.getCachedElements(element); |
| 958 if (elements != null) return elements; | 959 if (elements != null) return elements; |
| 959 assert(parser != null); | 960 assert(parser != null); |
| 960 Node tree = parser.parse(element); | 961 Node tree = parser.parse(element); |
| 961 validator.validate(tree); | 962 validator.validate(tree); |
| 962 elements = resolver.resolve(element); | 963 elements = resolver.resolve(element); |
| 963 if (elements != null) { | 964 if (elements != null) { |
| 964 // Only analyze nodes with a corresponding [TreeElements]. | 965 // Only analyze nodes with a corresponding [TreeElements]. |
| 965 checker.check(tree, elements); | 966 checker.check(tree, elements); |
| 966 } | 967 } |
| (...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1337 | 1338 |
| 1338 void close() {} | 1339 void close() {} |
| 1339 | 1340 |
| 1340 toString() => name; | 1341 toString() => name; |
| 1341 | 1342 |
| 1342 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1343 /// Convenience method for getting an [api.CompilerOutputProvider]. |
| 1343 static NullSink outputProvider(String name, String extension) { | 1344 static NullSink outputProvider(String name, String extension) { |
| 1344 return new NullSink('$name.$extension'); | 1345 return new NullSink('$name.$extension'); |
| 1345 } | 1346 } |
| 1346 } | 1347 } |
| OLD | NEW |