| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 library rasta.kernel_visitor; | 5 library rasta.kernel_visitor; |
| 6 | 6 |
| 7 import 'package:kernel/ast.dart' as ir; | 7 import 'package:kernel/ast.dart' as ir; |
| 8 | 8 |
| 9 import 'package:kernel/accessors.dart' show | 9 import 'package:kernel/accessors.dart' show |
| 10 Accessor, | 10 Accessor, |
| (...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 return buildBreakTarget( | 759 return buildBreakTarget( |
| 760 new ir.DoStatement(body, condition), node, jumpTarget); | 760 new ir.DoStatement(body, condition), node, jumpTarget); |
| 761 } | 761 } |
| 762 | 762 |
| 763 @override | 763 @override |
| 764 ir.EmptyStatement visitEmptyStatement(EmptyStatement node) { | 764 ir.EmptyStatement visitEmptyStatement(EmptyStatement node) { |
| 765 return new ir.EmptyStatement(); | 765 return new ir.EmptyStatement(); |
| 766 } | 766 } |
| 767 | 767 |
| 768 @override | 768 @override |
| 769 ir.Throw visitEnum(Enum node) { | 769 visitEnum(Enum node) { |
| 770 return buildUnsupported(node, "Enum"); | 770 // Not called normally. In dart2js, enums are represented as class |
| 771 // elements, so `classToIr` handles enums. All the synthetic members of an |
| 772 // enum class have already been installed by dart2js and we don't have to |
| 773 // do anything special. |
| 774 return internalError(node, "Enum"); |
| 771 } | 775 } |
| 772 | 776 |
| 773 @override | 777 @override |
| 774 ir.ExpressionStatement visitExpressionStatement(ExpressionStatement node) { | 778 ir.ExpressionStatement visitExpressionStatement(ExpressionStatement node) { |
| 775 return new ir.ExpressionStatement(visitForEffect(node.expression)); | 779 return new ir.ExpressionStatement(visitForEffect(node.expression)); |
| 776 } | 780 } |
| 777 | 781 |
| 778 @override | 782 @override |
| 779 ir.Statement visitFor(For node) { | 783 ir.Statement visitFor(For node) { |
| 780 VariableDefinitions initializers = | 784 VariableDefinitions initializers = |
| (...skipping 2268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3049 : this(null, true, node, initializers); | 3053 : this(null, true, node, initializers); |
| 3050 | 3054 |
| 3051 accept(ir.Visitor v) => throw "unsupported"; | 3055 accept(ir.Visitor v) => throw "unsupported"; |
| 3052 | 3056 |
| 3053 visitChildren(ir.Visitor v) => throw "unsupported"; | 3057 visitChildren(ir.Visitor v) => throw "unsupported"; |
| 3054 | 3058 |
| 3055 String toString() { | 3059 String toString() { |
| 3056 return "IrFunction($kind, $isConstructor, $node, $initializers)"; | 3060 return "IrFunction($kind, $isConstructor, $node, $initializers)"; |
| 3057 } | 3061 } |
| 3058 } | 3062 } |
| OLD | NEW |