| 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 Setlet<Node> get superUses; | 9 Setlet<Node> get superUses; |
| 10 | 10 |
| (...skipping 2570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2581 } | 2581 } |
| 2582 } else if (target.isTypeVariable()) { | 2582 } else if (target.isTypeVariable()) { |
| 2583 ClassElement cls = target.getEnclosingClass(); | 2583 ClassElement cls = target.getEnclosingClass(); |
| 2584 assert(enclosingElement.getEnclosingClass() == cls); | 2584 assert(enclosingElement.getEnclosingClass() == cls); |
| 2585 compiler.backend.registerClassUsingVariableExpression(cls); | 2585 compiler.backend.registerClassUsingVariableExpression(cls); |
| 2586 compiler.backend.registerTypeVariableExpression(mapping); | 2586 compiler.backend.registerTypeVariableExpression(mapping); |
| 2587 // Set the type of the node to [Type] to mark this send as a | 2587 // Set the type of the node to [Type] to mark this send as a |
| 2588 // type variable expression. | 2588 // type variable expression. |
| 2589 mapping.setType(node, compiler.typeClass.computeType(compiler)); | 2589 mapping.setType(node, compiler.typeClass.computeType(compiler)); |
| 2590 world.registerTypeLiteral(target, mapping); | 2590 world.registerTypeLiteral(target, mapping); |
| 2591 } else if (target.impliesType() && !sendIsMemberAccess) { | 2591 } else if (target.impliesType() && (!sendIsMemberAccess || node.isCall)) { |
| 2592 // Set the type of the node to [Type] to mark this send as a | 2592 // Set the type of the node to [Type] to mark this send as a |
| 2593 // type literal. | 2593 // type literal. |
| 2594 mapping.setType(node, compiler.typeClass.computeType(compiler)); | 2594 mapping.setType(node, compiler.typeClass.computeType(compiler)); |
| 2595 world.registerTypeLiteral(target, mapping); | 2595 world.registerTypeLiteral(target, mapping); |
| 2596 | 2596 |
| 2597 // Don't try to make constants of calls to type literals. | 2597 // Don't try to make constants of calls to type literals. |
| 2598 analyzeConstant(node, isConst: !node.isCall); | 2598 analyzeConstant(node, isConst: !node.isCall); |
| 2599 } | 2599 } |
| 2600 if (isPotentiallyMutableTarget(target)) { | 2600 if (isPotentiallyMutableTarget(target)) { |
| 2601 if (enclosingElement != target.enclosingElement) { | 2601 if (enclosingElement != target.enclosingElement) { |
| (...skipping 2149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4751 return finishConstructorReference(visit(expression), | 4751 return finishConstructorReference(visit(expression), |
| 4752 expression, expression); | 4752 expression, expression); |
| 4753 } | 4753 } |
| 4754 } | 4754 } |
| 4755 | 4755 |
| 4756 /// Looks up [name] in [scope] and unwraps the result. | 4756 /// Looks up [name] in [scope] and unwraps the result. |
| 4757 Element lookupInScope(Compiler compiler, Node node, | 4757 Element lookupInScope(Compiler compiler, Node node, |
| 4758 Scope scope, String name) { | 4758 Scope scope, String name) { |
| 4759 return Elements.unwrap(scope.lookup(name), compiler, node); | 4759 return Elements.unwrap(scope.lookup(name), compiler, node); |
| 4760 } | 4760 } |
| OLD | NEW |