| 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 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 ResolverVisitor visitor = visitorFor(element); | 428 ResolverVisitor visitor = visitorFor(element); |
| 429 // TODO(johnniwinther): Avoid analyzing initializers if | 429 // TODO(johnniwinther): Avoid analyzing initializers if |
| 430 // [Compiler.analyzeSignaturesOnly] is set. | 430 // [Compiler.analyzeSignaturesOnly] is set. |
| 431 initializerDo(tree, visitor.visit); | 431 initializerDo(tree, visitor.visit); |
| 432 | 432 |
| 433 if (Elements.isStaticOrTopLevelField(element)) { | 433 if (Elements.isStaticOrTopLevelField(element)) { |
| 434 if (tree.asSendSet() != null) { | 434 if (tree.asSendSet() != null) { |
| 435 // TODO(ngeoffray): We could do better here by using the | 435 // TODO(ngeoffray): We could do better here by using the |
| 436 // constant handler to figure out if it's a lazy field or not. | 436 // constant handler to figure out if it's a lazy field or not. |
| 437 compiler.backend.registerLazyField(visitor.mapping); | 437 compiler.backend.registerLazyField(visitor.mapping); |
| 438 } else { |
| 439 compiler.enqueuer.resolution.registerInstantiatedClass( |
| 440 compiler.nullClass, visitor.mapping); |
| 438 } | 441 } |
| 439 } | 442 } |
| 440 | 443 |
| 441 // Perform various checks as side effect of "computing" the type. | 444 // Perform various checks as side effect of "computing" the type. |
| 442 element.computeType(compiler); | 445 element.computeType(compiler); |
| 443 | 446 |
| 444 return visitor.mapping; | 447 return visitor.mapping; |
| 445 } | 448 } |
| 446 | 449 |
| 447 TreeElements resolveParameter(Element element) { | 450 TreeElements resolveParameter(Element element) { |
| (...skipping 3509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3957 return e; | 3960 return e; |
| 3958 } | 3961 } |
| 3959 | 3962 |
| 3960 /// Assumed to be called by [resolveRedirectingFactory]. | 3963 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3961 Element visitReturn(Return node) { | 3964 Element visitReturn(Return node) { |
| 3962 Node expression = node.expression; | 3965 Node expression = node.expression; |
| 3963 return finishConstructorReference(visit(expression), | 3966 return finishConstructorReference(visit(expression), |
| 3964 expression, expression); | 3967 expression, expression); |
| 3965 } | 3968 } |
| 3966 } | 3969 } |
| OLD | NEW |