| 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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 ir.Primitive visitCascadeReceiver(ast.CascadeReceiver node) { | 620 ir.Primitive visitCascadeReceiver(ast.CascadeReceiver node) { |
| 621 assert(irBuilder.isOpen); | 621 assert(irBuilder.isOpen); |
| 622 return _currentCascadeReceiver = visit(node.expression); | 622 return _currentCascadeReceiver = visit(node.expression); |
| 623 } | 623 } |
| 624 | 624 |
| 625 ir.Primitive visitCascade(ast.Cascade node) { | 625 ir.Primitive visitCascade(ast.Cascade node) { |
| 626 assert(irBuilder.isOpen); | 626 assert(irBuilder.isOpen); |
| 627 var oldCascadeReceiver = _currentCascadeReceiver; | 627 var oldCascadeReceiver = _currentCascadeReceiver; |
| 628 // Throw away the result of visiting the expression. | 628 // Throw away the result of visiting the expression. |
| 629 // Instead we return the result of visiting the CascadeReceiver. | 629 // Instead we return the result of visiting the CascadeReceiver. |
| 630 this.visit(node.expression); | 630 visit(node.expression); |
| 631 ir.Primitive receiver = _currentCascadeReceiver; | 631 ir.Primitive receiver = _currentCascadeReceiver; |
| 632 _currentCascadeReceiver = oldCascadeReceiver; | 632 _currentCascadeReceiver = oldCascadeReceiver; |
| 633 return receiver; | 633 return receiver; |
| 634 } | 634 } |
| 635 | 635 |
| 636 // ## Sends ## | 636 // ## Sends ## |
| 637 @override | 637 @override |
| 638 ir.Primitive visitAssert(ast.Send node, ast.Node condition, _) { | 638 ir.Primitive visitAssert(ast.Send node, ast.Node condition, _) { |
| 639 assert(irBuilder.isOpen); | 639 assert(irBuilder.isOpen); |
| 640 if (compiler.enableUserAssertions) { | 640 if (compiler.enableUserAssertions) { |
| (...skipping 2114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2755 SourceInformation buildCall(ast.Node node) { | 2755 SourceInformation buildCall(ast.Node node) { |
| 2756 return new PositionSourceInformation( | 2756 return new PositionSourceInformation( |
| 2757 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); | 2757 new TokenSourceLocation(sourceFile, node.getBeginToken(), name)); |
| 2758 } | 2758 } |
| 2759 | 2759 |
| 2760 @override | 2760 @override |
| 2761 SourceInformationBuilder forContext(AstElement element) { | 2761 SourceInformationBuilder forContext(AstElement element) { |
| 2762 return new PositionSourceInformationBuilder(element); | 2762 return new PositionSourceInformationBuilder(element); |
| 2763 } | 2763 } |
| 2764 } | 2764 } |
| OLD | NEW |