| 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 resolution; | 5 part of resolution; |
| 6 | 6 |
| 7 abstract class TreeElements { | 7 abstract class TreeElements { |
| 8 Element get currentElement; | 8 Element get currentElement; |
| 9 Set<Node> get superUses; | 9 Set<Node> get superUses; |
| 10 | 10 |
| (...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 bool isConstructor = | 334 bool isConstructor = |
| 335 identical(element.kind, ElementKind.GENERATIVE_CONSTRUCTOR); | 335 identical(element.kind, ElementKind.GENERATIVE_CONSTRUCTOR); |
| 336 TreeElements elements = | 336 TreeElements elements = |
| 337 compiler.enqueuer.resolution.getCachedElements(element); | 337 compiler.enqueuer.resolution.getCachedElements(element); |
| 338 if (elements != null) { | 338 if (elements != null) { |
| 339 assert(isConstructor); | 339 assert(isConstructor); |
| 340 return elements; | 340 return elements; |
| 341 } | 341 } |
| 342 if (element.isSynthesized) { | 342 if (element.isSynthesized) { |
| 343 Element target = element.targetConstructor; | 343 Element target = element.targetConstructor; |
| 344 // Ensure the signature of the synthesized element is |
| 345 // resolved. This is the only place where the resolver is |
| 346 // seeing this element. |
| 347 element.computeSignature(compiler); |
| 344 if (!target.isErroneous()) { | 348 if (!target.isErroneous()) { |
| 345 compiler.enqueuer.resolution.registerStaticUse( | 349 compiler.enqueuer.resolution.registerStaticUse( |
| 346 element.targetConstructor); | 350 element.targetConstructor); |
| 347 } | 351 } |
| 348 return new TreeElementMapping(element); | 352 return new TreeElementMapping(element); |
| 349 } | 353 } |
| 350 if (element.isPatched) { | 354 if (element.isPatched) { |
| 351 checkMatchingPatchSignatures(element, element.patch); | 355 checkMatchingPatchSignatures(element, element.patch); |
| 352 element = element.patch; | 356 element = element.patch; |
| 353 } | 357 } |
| (...skipping 3732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4086 return e; | 4090 return e; |
| 4087 } | 4091 } |
| 4088 | 4092 |
| 4089 /// Assumed to be called by [resolveRedirectingFactory]. | 4093 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4090 Element visitReturn(Return node) { | 4094 Element visitReturn(Return node) { |
| 4091 Node expression = node.expression; | 4095 Node expression = node.expression; |
| 4092 return finishConstructorReference(visit(expression), | 4096 return finishConstructorReference(visit(expression), |
| 4093 expression, expression); | 4097 expression, expression); |
| 4094 } | 4098 } |
| 4095 } | 4099 } |
| OLD | NEW |