| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library analyzer2dart.cps_generator; | 5 library analyzer2dart.cps_generator; |
| 6 | 6 |
| 7 import 'package:analyzer/analyzer.dart'; | 7 import 'package:analyzer/analyzer.dart'; |
| 8 | 8 |
| 9 import 'package:compiler/src/dart_types.dart' as dart2js; | 9 import 'package:compiler/src/dart_types.dart' as dart2js; |
| 10 import 'package:compiler/src/elements/elements.dart' as dart2js; | 10 import 'package:compiler/src/elements/elements.dart' as dart2js; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 | 210 |
| 211 @override | 211 @override |
| 212 ir.Node visitLocalFunctionAccess(AstNode node, AccessSemantics semantics) { | 212 ir.Node visitLocalFunctionAccess(AstNode node, AccessSemantics semantics) { |
| 213 return handleLocalAccess(node, semantics); | 213 return handleLocalAccess(node, semantics); |
| 214 } | 214 } |
| 215 | 215 |
| 216 ir.Primitive handleLocalInvocation(MethodInvocation node, | 216 ir.Primitive handleLocalInvocation(MethodInvocation node, |
| 217 AccessSemantics semantics) { | 217 AccessSemantics semantics) { |
| 218 analyzer.Element staticElement = semantics.element; | 218 analyzer.Element staticElement = semantics.element; |
| 219 dart2js.Element element = converter.convertElement(staticElement); | 219 dart2js.Element element = converter.convertElement(staticElement); |
| 220 ir.Primitive receiver = irBuilder.buildLocalGet(element); |
| 220 List<ir.Definition> arguments = visitArguments(node.argumentList); | 221 List<ir.Definition> arguments = visitArguments(node.argumentList); |
| 221 return irBuilder.buildLocalInvocation( | 222 return irBuilder.buildFunctionExpressionInvocation( |
| 222 element, | 223 receiver, |
| 223 createSelectorFromMethodInvocation( | 224 createSelectorFromMethodInvocation( |
| 224 node.argumentList, node.methodName.name), | 225 node.argumentList, node.methodName.name), |
| 225 arguments); | 226 arguments); |
| 226 } | 227 } |
| 227 | 228 |
| 228 @override | 229 @override |
| 229 ir.Node visitLocalVariableInvocation(MethodInvocation node, | 230 ir.Node visitLocalVariableInvocation(MethodInvocation node, |
| 230 AccessSemantics semantics) { | 231 AccessSemantics semantics) { |
| 231 return handleLocalInvocation(node, semantics); | 232 return handleLocalInvocation(node, semantics); |
| 232 } | 233 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 569 return irBuilder.buildTypeOperator( | 570 return irBuilder.buildTypeOperator( |
| 570 visit(node.expression), | 571 visit(node.expression), |
| 571 converter.convertType(node.type.type), | 572 converter.convertType(node.type.type), |
| 572 isTypeTest: false); | 573 isTypeTest: false); |
| 573 } | 574 } |
| 574 } | 575 } |
| 575 | 576 |
| 576 class NullCapturedVariableInfo extends DartCapturedVariableInfo { | 577 class NullCapturedVariableInfo extends DartCapturedVariableInfo { |
| 577 Iterable get capturedVariables => const []; | 578 Iterable get capturedVariables => const []; |
| 578 } | 579 } |
| OLD | NEW |