| 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 2302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2313 selector.name == const SourceString('JS')) { | 2313 selector.name == const SourceString('JS')) { |
| 2314 world.registerJsCall(node, this); | 2314 world.registerJsCall(node, this); |
| 2315 } | 2315 } |
| 2316 } | 2316 } |
| 2317 | 2317 |
| 2318 // TODO(ngeoffray): Warn if target is null and the send is | 2318 // TODO(ngeoffray): Warn if target is null and the send is |
| 2319 // unqualified. | 2319 // unqualified. |
| 2320 useElement(node, target); | 2320 useElement(node, target); |
| 2321 registerSend(selector, target); | 2321 registerSend(selector, target); |
| 2322 if (node.isPropertyAccess && Elements.isStaticOrTopLevelFunction(target)) { | 2322 if (node.isPropertyAccess && Elements.isStaticOrTopLevelFunction(target)) { |
| 2323 world.registerGetOfStaticFunction(target); | 2323 world.registerGetOfStaticFunction(target.declaration); |
| 2324 } | 2324 } |
| 2325 return node.isPropertyAccess ? target : null; | 2325 return node.isPropertyAccess ? target : null; |
| 2326 } | 2326 } |
| 2327 | 2327 |
| 2328 void warnArgumentMismatch(Send node, Element target) { | 2328 void warnArgumentMismatch(Send node, Element target) { |
| 2329 compiler.backend.registerThrowNoSuchMethod(mapping); | 2329 compiler.backend.registerThrowNoSuchMethod(mapping); |
| 2330 // TODO(karlklose): we can be more precise about the reason of the | 2330 // TODO(karlklose): we can be more precise about the reason of the |
| 2331 // mismatch. | 2331 // mismatch. |
| 2332 warning(node.argumentsNode, MessageKind.INVALID_ARGUMENTS, | 2332 warning(node.argumentsNode, MessageKind.INVALID_ARGUMENTS, |
| 2333 {'methodName': target.name}); | 2333 {'methodName': target.name}); |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4026 return e; | 4026 return e; |
| 4027 } | 4027 } |
| 4028 | 4028 |
| 4029 /// Assumed to be called by [resolveRedirectingFactory]. | 4029 /// Assumed to be called by [resolveRedirectingFactory]. |
| 4030 Element visitReturn(Return node) { | 4030 Element visitReturn(Return node) { |
| 4031 Node expression = node.expression; | 4031 Node expression = node.expression; |
| 4032 return finishConstructorReference(visit(expression), | 4032 return finishConstructorReference(visit(expression), |
| 4033 expression, expression); | 4033 expression, expression); |
| 4034 } | 4034 } |
| 4035 } | 4035 } |
| OLD | NEW |