| 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); | |
| 221 List<ir.Definition> arguments = visitArguments(node.argumentList); | 220 List<ir.Definition> arguments = visitArguments(node.argumentList); |
| 222 return irBuilder.buildFunctionExpressionInvocation( | 221 return irBuilder.buildLocalInvocation( |
| 223 receiver, | 222 element, |
| 224 createSelectorFromMethodInvocation( | 223 createSelectorFromMethodInvocation( |
| 225 node.argumentList, node.methodName.name), | 224 node.argumentList, node.methodName.name), |
| 226 arguments); | 225 arguments); |
| 227 } | 226 } |
| 228 | 227 |
| 229 @override | 228 @override |
| 230 ir.Node visitLocalVariableInvocation(MethodInvocation node, | 229 ir.Node visitLocalVariableInvocation(MethodInvocation node, |
| 231 AccessSemantics semantics) { | 230 AccessSemantics semantics) { |
| 232 return handleLocalInvocation(node, semantics); | 231 return handleLocalInvocation(node, semantics); |
| 233 } | 232 } |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 570 return irBuilder.buildTypeOperator( | 569 return irBuilder.buildTypeOperator( |
| 571 visit(node.expression), | 570 visit(node.expression), |
| 572 converter.convertType(node.type.type), | 571 converter.convertType(node.type.type), |
| 573 isTypeTest: false); | 572 isTypeTest: false); |
| 574 } | 573 } |
| 575 } | 574 } |
| 576 | 575 |
| 577 class NullCapturedVariableInfo extends DartCapturedVariableInfo { | 576 class NullCapturedVariableInfo extends DartCapturedVariableInfo { |
| 578 Iterable get capturedVariables => const []; | 577 Iterable get capturedVariables => const []; |
| 579 } | 578 } |
| OLD | NEW |