| 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 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 // Throw away the result of visiting the expression. | 642 // Throw away the result of visiting the expression. |
| 643 // Instead we return the result of visiting the CascadeReceiver. | 643 // Instead we return the result of visiting the CascadeReceiver. |
| 644 visit(node.expression); | 644 visit(node.expression); |
| 645 ir.Primitive receiver = _currentCascadeReceiver; | 645 ir.Primitive receiver = _currentCascadeReceiver; |
| 646 _currentCascadeReceiver = oldCascadeReceiver; | 646 _currentCascadeReceiver = oldCascadeReceiver; |
| 647 return receiver; | 647 return receiver; |
| 648 } | 648 } |
| 649 | 649 |
| 650 // ## Sends ## | 650 // ## Sends ## |
| 651 @override | 651 @override |
| 652 ir.Primitive visitAssert(ast.Send node, ast.Node condition, _) { | |
| 653 assert(irBuilder.isOpen); | |
| 654 if (compiler.enableUserAssertions) { | |
| 655 return giveup(node, 'assert in checked mode not implemented'); | |
| 656 } else { | |
| 657 // The call to assert and its argument expression must be ignored | |
| 658 // in production mode. | |
| 659 // Assertions can only occur in expression statements, so no value needs | |
| 660 // to be returned. | |
| 661 return null; | |
| 662 } | |
| 663 } | |
| 664 | |
| 665 @override | |
| 666 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) { | 652 void previsitDeferredAccess(ast.Send node, PrefixElement prefix, _) { |
| 667 giveup(node, 'deferred access is not implemented'); | 653 giveup(node, 'deferred access is not implemented'); |
| 668 } | 654 } |
| 669 | 655 |
| 670 ir.Primitive visitNamedArgument(ast.NamedArgument node) { | 656 ir.Primitive visitNamedArgument(ast.NamedArgument node) { |
| 671 assert(irBuilder.isOpen); | 657 assert(irBuilder.isOpen); |
| 672 return visit(node.expression); | 658 return visit(node.expression); |
| 673 } | 659 } |
| 674 | 660 |
| 675 @override | 661 @override |
| (...skipping 2725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3401 if (compiler.backend.isForeign(function)) { | 3387 if (compiler.backend.isForeign(function)) { |
| 3402 return handleForeignCode(node, function, argumentList, callStructure); | 3388 return handleForeignCode(node, function, argumentList, callStructure); |
| 3403 } else { | 3389 } else { |
| 3404 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3390 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3405 translateStaticArguments(argumentList, function, callStructure), | 3391 translateStaticArguments(argumentList, function, callStructure), |
| 3406 sourceInformation: | 3392 sourceInformation: |
| 3407 sourceInformationBuilder.buildCall(node, node.selector)); | 3393 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3408 } | 3394 } |
| 3409 } | 3395 } |
| 3410 } | 3396 } |
| OLD | NEW |