| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 assert(irBuilder.isOpen); | 641 assert(irBuilder.isOpen); |
| 642 var oldCascadeReceiver = _currentCascadeReceiver; | 642 var oldCascadeReceiver = _currentCascadeReceiver; |
| 643 // Throw away the result of visiting the expression. | 643 // Throw away the result of visiting the expression. |
| 644 // Instead we return the result of visiting the CascadeReceiver. | 644 // Instead we return the result of visiting the CascadeReceiver. |
| 645 visit(node.expression); | 645 visit(node.expression); |
| 646 ir.Primitive receiver = _currentCascadeReceiver; | 646 ir.Primitive receiver = _currentCascadeReceiver; |
| 647 _currentCascadeReceiver = oldCascadeReceiver; | 647 _currentCascadeReceiver = oldCascadeReceiver; |
| 648 return receiver; | 648 return receiver; |
| 649 } | 649 } |
| 650 | 650 |
| 651 // ## Sends ## |
| 651 @override | 652 @override |
| 652 ir.Primitive visitAssert(ast.Assert node) { | 653 ir.Primitive visitAssert(ast.Send node, ast.Node condition, _) { |
| 653 assert(irBuilder.isOpen); | 654 assert(irBuilder.isOpen); |
| 654 if (compiler.enableUserAssertions) { | 655 if (compiler.enableUserAssertions) { |
| 655 return giveup(node, 'assert in checked mode not implemented'); | 656 return giveup(node, 'assert in checked mode not implemented'); |
| 656 } else { | 657 } else { |
| 657 // The call to assert and its argument expression must be ignored | 658 // The call to assert and its argument expression must be ignored |
| 658 // in production mode. | 659 // in production mode. |
| 659 // Assertions can only occur in expression statements, so no value needs | 660 // Assertions can only occur in expression statements, so no value needs |
| 660 // to be returned. | 661 // to be returned. |
| 661 return null; | 662 return null; |
| 662 } | 663 } |
| 663 } | 664 } |
| 664 | 665 |
| 665 // ## Sends ## | |
| 666 @override | 666 @override |
| 667 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) { | 667 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) { |
| 668 giveup(node, 'deferred access is not implemented'); | 668 giveup(node, 'deferred access is not implemented'); |
| 669 } | 669 } |
| 670 | 670 |
| 671 ir.Primitive visitNamedArgument(ast.NamedArgument node) { | 671 ir.Primitive visitNamedArgument(ast.NamedArgument node) { |
| 672 assert(irBuilder.isOpen); | 672 assert(irBuilder.isOpen); |
| 673 return visit(node.expression); | 673 return visit(node.expression); |
| 674 } | 674 } |
| 675 | 675 |
| (...skipping 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3570 if (compiler.backend.isForeign(function)) { | 3570 if (compiler.backend.isForeign(function)) { |
| 3571 return handleForeignCode(node, function, argumentList, callStructure); | 3571 return handleForeignCode(node, function, argumentList, callStructure); |
| 3572 } else { | 3572 } else { |
| 3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3574 translateStaticArguments(argumentList, function, callStructure), | 3574 translateStaticArguments(argumentList, function, callStructure), |
| 3575 sourceInformation: | 3575 sourceInformation: |
| 3576 sourceInformationBuilder.buildCall(node, node.selector)); | 3576 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3577 } | 3577 } |
| 3578 } | 3578 } |
| 3579 } | 3579 } |
| OLD | NEW |