| 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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 // Calls are translated to direct style. | 344 // Calls are translated to direct style. |
| 345 List<Expression> arguments = translateArguments(node.arguments); | 345 List<Expression> arguments = translateArguments(node.arguments); |
| 346 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, | 346 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, |
| 347 sourceInformation: node.sourceInformation); | 347 sourceInformation: node.sourceInformation); |
| 348 return continueWithExpression(node.continuation, invoke); | 348 return continueWithExpression(node.continuation, invoke); |
| 349 } | 349 } |
| 350 | 350 |
| 351 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { | 351 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { |
| 352 InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiver), | 352 InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiver), |
| 353 node.selector, | 353 node.selector, |
| 354 node.mask, | |
| 355 translateArguments(node.arguments)); | 354 translateArguments(node.arguments)); |
| 356 invoke.receiverIsNotNull = node.receiverIsNotNull; | 355 invoke.receiverIsNotNull = node.receiverIsNotNull; |
| 357 return continueWithExpression(node.continuation, invoke); | 356 return continueWithExpression(node.continuation, invoke); |
| 358 } | 357 } |
| 359 | 358 |
| 360 Statement visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) { | 359 Statement visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) { |
| 361 Expression receiver = getVariableUse(node.receiver); | 360 Expression receiver = getVariableUse(node.receiver); |
| 362 List<Expression> arguments = translateArguments(node.arguments); | 361 List<Expression> arguments = translateArguments(node.arguments); |
| 363 Expression invoke = new InvokeMethodDirectly(receiver, node.target, | 362 Expression invoke = new InvokeMethodDirectly(receiver, node.target, |
| 364 node.selector, arguments); | 363 node.selector, arguments); |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 586 |
| 588 Expression visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { | 587 Expression visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { |
| 589 if (node.operator == BuiltinOperator.IsFalsy) { | 588 if (node.operator == BuiltinOperator.IsFalsy) { |
| 590 return new Not(getVariableUse(node.arguments.single)); | 589 return new Not(getVariableUse(node.arguments.single)); |
| 591 } | 590 } |
| 592 return new ApplyBuiltinOperator(node.operator, | 591 return new ApplyBuiltinOperator(node.operator, |
| 593 translateArguments(node.arguments)); | 592 translateArguments(node.arguments)); |
| 594 } | 593 } |
| 595 } | 594 } |
| 596 | 595 |
| OLD | NEW |