| 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.resolution; | 5 library dart2js.resolution; |
| 6 | 6 |
| 7 import 'dart:collection' show Queue; | 7 import 'dart:collection' show Queue; |
| 8 | 8 |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../common/names.dart' show | 10 import '../common/names.dart' show |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 if (element.isGenerativeConstructor) { | 291 if (element.isGenerativeConstructor) { |
| 292 ResolutionRegistry registry = | 292 ResolutionRegistry registry = |
| 293 new ResolutionRegistry(compiler, _ensureTreeElements(element)); | 293 new ResolutionRegistry(compiler, _ensureTreeElements(element)); |
| 294 ConstructorElement constructor = element.asFunctionElement(); | 294 ConstructorElement constructor = element.asFunctionElement(); |
| 295 ConstructorElement target = constructor.definingConstructor; | 295 ConstructorElement target = constructor.definingConstructor; |
| 296 // Ensure the signature of the synthesized element is | 296 // Ensure the signature of the synthesized element is |
| 297 // resolved. This is the only place where the resolver is | 297 // resolved. This is the only place where the resolver is |
| 298 // seeing this element. | 298 // seeing this element. |
| 299 element.computeType(resolution); | 299 element.computeType(resolution); |
| 300 if (!target.isErroneous) { | 300 if (!target.isErroneous) { |
| 301 registry.registerStaticUse(target); | |
| 302 registry.registerImplicitSuperCall(target); | 301 registry.registerImplicitSuperCall(target); |
| 303 } | 302 } |
| 304 return registry.worldImpact; | 303 return registry.worldImpact; |
| 305 } else { | 304 } else { |
| 306 assert(element.isDeferredLoaderGetter || element.isErroneous); | 305 assert(element.isDeferredLoaderGetter || element.isErroneous); |
| 307 _ensureTreeElements(element); | 306 _ensureTreeElements(element); |
| 308 return const ResolutionImpact(); | 307 return const ResolutionImpact(); |
| 309 } | 308 } |
| 310 } else { | 309 } else { |
| 311 element.parseNode(resolution.parsing); | 310 element.parseNode(resolution.parsing); |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1068 TreeElements get treeElements { | 1067 TreeElements get treeElements { |
| 1069 assert(invariant(this, _treeElements !=null, | 1068 assert(invariant(this, _treeElements !=null, |
| 1070 message: "TreeElements have not been computed for $this.")); | 1069 message: "TreeElements have not been computed for $this.")); |
| 1071 return _treeElements; | 1070 return _treeElements; |
| 1072 } | 1071 } |
| 1073 | 1072 |
| 1074 void reuseElement() { | 1073 void reuseElement() { |
| 1075 _treeElements = null; | 1074 _treeElements = null; |
| 1076 } | 1075 } |
| 1077 } | 1076 } |
| OLD | NEW |