Chromium Code Reviews| 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 '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 629 // Throw away the result of visiting the expression. | 629 // Throw away the result of visiting the expression. |
| 630 // Instead we return the result of visiting the CascadeReceiver. | 630 // Instead we return the result of visiting the CascadeReceiver. |
| 631 this.visit(node.expression); | 631 this.visit(node.expression); |
| 632 ir.Primitive receiver = _currentCascadeReceiver; | 632 ir.Primitive receiver = _currentCascadeReceiver; |
| 633 _currentCascadeReceiver = oldCascadeReceiver; | 633 _currentCascadeReceiver = oldCascadeReceiver; |
| 634 return receiver; | 634 return receiver; |
| 635 } | 635 } |
| 636 | 636 |
| 637 // ## Sends ## | 637 // ## Sends ## |
| 638 @override | 638 @override |
| 639 ir.Primitive visitAssert( | 639 visitAssert(ast.Send node, ast.Node condition, _) { |
|
karlklose
2015/04/13 12:31:51
I would prefer to keep the type annotation and to
asgerf
2015/04/13 12:35:55
Done.
| |
| 640 ast.Send node, | |
| 641 ast.Node condition, | |
| 642 _) { | |
| 643 assert(irBuilder.isOpen); | 640 assert(irBuilder.isOpen); |
| 644 return giveup(node, 'Assert'); | 641 if (!compiler.enableUserAssertions) { |
| 642 return; | |
| 643 } | |
| 644 giveup(node, 'Assert'); | |
| 645 } | 645 } |
| 646 | 646 |
| 647 ir.Primitive visitNamedArgument(ast.NamedArgument node) { | 647 ir.Primitive visitNamedArgument(ast.NamedArgument node) { |
| 648 assert(irBuilder.isOpen); | 648 assert(irBuilder.isOpen); |
| 649 return visit(node.expression); | 649 return visit(node.expression); |
| 650 } | 650 } |
| 651 | 651 |
| 652 @override | 652 @override |
| 653 ir.Primitive visitExpressionInvoke(ast.Send node, | 653 ir.Primitive visitExpressionInvoke(ast.Send node, |
| 654 ast.Node expression, | 654 ast.Node expression, |
| (...skipping 2082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2737 SourceInformation buildCall(ast.Node node) { | 2737 SourceInformation buildCall(ast.Node node) { |
| 2738 return new PositionSourceInformation( | 2738 return new PositionSourceInformation( |
| 2739 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); | 2739 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); |
| 2740 } | 2740 } |
| 2741 | 2741 |
| 2742 @override | 2742 @override |
| 2743 SourceInformationBuilder forContext(AstElement element) { | 2743 SourceInformationBuilder forContext(AstElement element) { |
| 2744 return new PositionSourceInformationBuilder(element); | 2744 return new PositionSourceInformationBuilder(element); |
| 2745 } | 2745 } |
| 2746 } | 2746 } |
| OLD | NEW |