| 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 operator[](Node node); | 8 Element operator[](Node node); |
| 9 Selector getSelector(Send send); | 9 Selector getSelector(Send send); |
| 10 DartType getType(Node node); | 10 DartType getType(Node node); |
| (...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1793 // We call 'call()' on a Type instance returned from the reference to a | 1793 // We call 'call()' on a Type instance returned from the reference to a |
| 1794 // class or typedef literal. We do not need to register this call as a | 1794 // class or typedef literal. We do not need to register this call as a |
| 1795 // dynamic invocation, because we statically know what the target is. | 1795 // dynamic invocation, because we statically know what the target is. |
| 1796 } else if (!selector.applies(target, compiler)) { | 1796 } else if (!selector.applies(target, compiler)) { |
| 1797 warnArgumentMismatch(node, target); | 1797 warnArgumentMismatch(node, target); |
| 1798 } | 1798 } |
| 1799 | 1799 |
| 1800 if (target != null && | 1800 if (target != null && |
| 1801 target.kind == ElementKind.FOREIGN && | 1801 target.kind == ElementKind.FOREIGN && |
| 1802 selector.name == const SourceString('JS')) { | 1802 selector.name == const SourceString('JS')) { |
| 1803 world.nativeEnqueuer.registerJsCall(node, this); | 1803 world.registerJsCall(node, this); |
| 1804 } | 1804 } |
| 1805 } | 1805 } |
| 1806 | 1806 |
| 1807 // TODO(ngeoffray): Warn if target is null and the send is | 1807 // TODO(ngeoffray): Warn if target is null and the send is |
| 1808 // unqualified. | 1808 // unqualified. |
| 1809 useElement(node, target); | 1809 useElement(node, target); |
| 1810 registerSend(selector, target); | 1810 registerSend(selector, target); |
| 1811 if (node.isPropertyAccess) { | 1811 if (node.isPropertyAccess) { |
| 1812 // It might be the closurization of a method. | 1812 // It might be the closurization of a method. |
| 1813 world.registerInstantiatedClass(compiler.functionClass); | 1813 world.registerInstantiatedClass(compiler.functionClass); |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3152 return e; | 3152 return e; |
| 3153 } | 3153 } |
| 3154 | 3154 |
| 3155 /// Assumed to be called by [resolveRedirectingFactory]. | 3155 /// Assumed to be called by [resolveRedirectingFactory]. |
| 3156 Element visitReturn(Return node) { | 3156 Element visitReturn(Return node) { |
| 3157 Node expression = node.expression; | 3157 Node expression = node.expression; |
| 3158 return finishConstructorReference(visit(expression), | 3158 return finishConstructorReference(visit(expression), |
| 3159 expression, expression); | 3159 expression, expression); |
| 3160 } | 3160 } |
| 3161 } | 3161 } |
| OLD | NEW |