| 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 '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; | 10 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 | 343 |
| 344 Statement visitInvokeStatic(cps_ir.InvokeStatic node) { | 344 Statement visitInvokeStatic(cps_ir.InvokeStatic node) { |
| 345 // Calls are translated to direct style. | 345 // Calls are translated to direct style. |
| 346 List<Expression> arguments = translateArguments(node.arguments); | 346 List<Expression> arguments = translateArguments(node.arguments); |
| 347 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, | 347 Expression invoke = new InvokeStatic(node.target, node.selector, arguments, |
| 348 sourceInformation: node.sourceInformation); | 348 sourceInformation: node.sourceInformation); |
| 349 return continueWithExpression(node.continuation, invoke); | 349 return continueWithExpression(node.continuation, invoke); |
| 350 } | 350 } |
| 351 | 351 |
| 352 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { | 352 Statement visitInvokeMethod(cps_ir.InvokeMethod node) { |
| 353 Expression invoke = new InvokeMethod(getVariableUse(node.receiver), | 353 InvokeMethod invoke = new InvokeMethod(getVariableUse(node.receiver), |
| 354 node.selector, | 354 node.selector, |
| 355 translateArguments(node.arguments)); | 355 translateArguments(node.arguments)); |
| 356 invoke.receiverIsNotNull = node.receiverIsNotNull; |
| 356 return continueWithExpression(node.continuation, invoke); | 357 return continueWithExpression(node.continuation, invoke); |
| 357 } | 358 } |
| 358 | 359 |
| 359 Statement visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) { | 360 Statement visitInvokeMethodDirectly(cps_ir.InvokeMethodDirectly node) { |
| 360 Expression receiver = getVariableUse(node.receiver); | 361 Expression receiver = getVariableUse(node.receiver); |
| 361 List<Expression> arguments = translateArguments(node.arguments); | 362 List<Expression> arguments = translateArguments(node.arguments); |
| 362 Expression invoke = new InvokeMethodDirectly(receiver, node.target, | 363 Expression invoke = new InvokeMethodDirectly(receiver, node.target, |
| 363 node.selector, arguments); | 364 node.selector, arguments); |
| 364 return continueWithExpression(node.continuation, invoke); | 365 return continueWithExpression(node.continuation, invoke); |
| 365 } | 366 } |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 | 572 |
| 572 Statement visitSetStatic(cps_ir.SetStatic node) { | 573 Statement visitSetStatic(cps_ir.SetStatic node) { |
| 573 SetStatic setStatic = new SetStatic( | 574 SetStatic setStatic = new SetStatic( |
| 574 node.element, | 575 node.element, |
| 575 getVariableUse(node.value), | 576 getVariableUse(node.value), |
| 576 node.sourceInformation); | 577 node.sourceInformation); |
| 577 return new ExpressionStatement(setStatic, visit(node.body)); | 578 return new ExpressionStatement(setStatic, visit(node.body)); |
| 578 } | 579 } |
| 579 } | 580 } |
| 580 | 581 |
| OLD | NEW |