| 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 tree_ir_builder; | 5 library tree_ir_builder; |
| 6 | 6 |
| 7 import '../dart2jslib.dart' as dart2js; | 7 import '../dart2jslib.dart' as dart2js; |
| 8 import '../elements/elements.dart'; | 8 import '../elements/elements.dart'; |
| 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; | 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; |
| 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; | 10 import '../util/util.dart' show CURRENT_ELEMENT_SPANNABLE; |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 List<Variable> catchParameters = | 359 List<Variable> catchParameters = |
| 360 node.handler.parameters.map(getVariable).toList(); | 360 node.handler.parameters.map(getVariable).toList(); |
| 361 Statement catchBody = visit(node.handler.body); | 361 Statement catchBody = visit(node.handler.body); |
| 362 return new Try(tryBody, catchParameters, catchBody); | 362 return new Try(tryBody, catchParameters, catchBody); |
| 363 } | 363 } |
| 364 | 364 |
| 365 Statement visitInvokeStatic(cps_ir.InvokeStatic node) { | 365 Statement visitInvokeStatic(cps_ir.InvokeStatic node) { |
| 366 // Calls are translated to direct style. | 366 // Calls are translated to direct style. |
| 367 List<Expression> arguments = translateArguments(node.arguments); | 367 List<Expression> arguments = translateArguments(node.arguments); |
| 368 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, | 368 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, |
| 369 sourceInformation: node.sourceInformation); | 369 node.sourceInformation); |
| 370 return continueWithExpression(node.continuation, invoke); | 370 return continueWithExpression(node.continuation, invoke); |
| 371 } | 371 } |
| 372 | 372 |
| 373 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { | 373 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { |
| 374 InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiver), | 374 InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiver), |
| 375 node.selector, | 375 node.selector, |
| 376 node.mask, | 376 node.mask, |
| 377 translateArguments(node.arguments)); | 377 translateArguments(node.arguments)); |
| 378 invoke.receiverIsNotNull = node.receiverIsNotNull; | 378 invoke.receiverIsNotNull = node.receiverIsNotNull; |
| 379 return continueWithExpression(node.continuation, invoke); | 379 return continueWithExpression(node.continuation, invoke); |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 return new ForeignStatement( | 623 return new ForeignStatement( |
| 624 node.codeTemplate, | 624 node.codeTemplate, |
| 625 node.type, | 625 node.type, |
| 626 node.arguments.map(getVariableUse).toList(growable: false), | 626 node.arguments.map(getVariableUse).toList(growable: false), |
| 627 node.nativeBehavior, | 627 node.nativeBehavior, |
| 628 node.dependency); | 628 node.dependency); |
| 629 } | 629 } |
| 630 } | 630 } |
| 631 } | 631 } |
| 632 | 632 |
| OLD | NEW |