| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 rewrite_async; | 5 library rewrite_async; |
| 6 | 6 |
| 7 // TODO(sigurdm): Throws in catch-handlers are handled wrong. | 7 // TODO(sigurdm): Throws in catch-handlers are handled wrong. |
| 8 // TODO(sigurdm): Avoid using variables in templates. It could blow up memory | 8 // TODO(sigurdm): Avoid using variables in templates. It could blow up memory |
| 9 // use. | 9 // use. |
| 10 | 10 |
| (...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 959 }, store: false); | 959 }, store: false); |
| 960 beginLabel(joinLabel); | 960 beginLabel(joinLabel); |
| 961 return new js.VariableUse(resultName); | 961 return new js.VariableUse(resultName); |
| 962 } | 962 } |
| 963 | 963 |
| 964 return withExpression2(node.left, node.right, | 964 return withExpression2(node.left, node.right, |
| 965 (left, right) => new js.Binary(node.op, left, right)); | 965 (left, right) => new js.Binary(node.op, left, right)); |
| 966 } | 966 } |
| 967 | 967 |
| 968 @override | 968 @override |
| 969 js.Expression visitBlob(js.Blob node) { | |
| 970 return node; | |
| 971 } | |
| 972 | |
| 973 @override | |
| 974 void visitBlock(js.Block node) { | 969 void visitBlock(js.Block node) { |
| 975 for (js.Statement statement in node.statements) { | 970 for (js.Statement statement in node.statements) { |
| 976 visitStatement(statement); | 971 visitStatement(statement); |
| 977 } | 972 } |
| 978 } | 973 } |
| 979 | 974 |
| 980 @override | 975 @override |
| 981 void visitBreak(js.Break node) { | 976 void visitBreak(js.Break node) { |
| 982 js.Node target = analysis.targets[node]; | 977 js.Node target = analysis.targets[node]; |
| 983 if (!shouldTransform(target)) { | 978 if (!shouldTransform(target)) { |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1815 } | 1810 } |
| 1816 | 1811 |
| 1817 @override | 1812 @override |
| 1818 bool visitBinary(js.Binary node) { | 1813 bool visitBinary(js.Binary node) { |
| 1819 bool left = visit(node.left); | 1814 bool left = visit(node.left); |
| 1820 bool right = visit(node.right); | 1815 bool right = visit(node.right); |
| 1821 return left || right; | 1816 return left || right; |
| 1822 } | 1817 } |
| 1823 | 1818 |
| 1824 @override | 1819 @override |
| 1825 bool visitBlob(js.Blob node) { | |
| 1826 return false; | |
| 1827 } | |
| 1828 | |
| 1829 @override | |
| 1830 bool visitBlock(js.Block node) { | 1820 bool visitBlock(js.Block node) { |
| 1831 bool containsAwait = false; | 1821 bool containsAwait = false; |
| 1832 for (js.Statement statement in node.statements) { | 1822 for (js.Statement statement in node.statements) { |
| 1833 if (visit(statement)) containsAwait = true; | 1823 if (visit(statement)) containsAwait = true; |
| 1834 } | 1824 } |
| 1835 return containsAwait; | 1825 return containsAwait; |
| 1836 } | 1826 } |
| 1837 | 1827 |
| 1838 @override | 1828 @override |
| 1839 bool visitBreak(js.Break node) { | 1829 bool visitBreak(js.Break node) { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2150 loopsAndSwitches.removeLast(); | 2140 loopsAndSwitches.removeLast(); |
| 2151 return condition || body; | 2141 return condition || body; |
| 2152 } | 2142 } |
| 2153 | 2143 |
| 2154 @override | 2144 @override |
| 2155 bool visitDartYield(js.DartYield node) { | 2145 bool visitDartYield(js.DartYield node) { |
| 2156 visit(node.expression); | 2146 visit(node.expression); |
| 2157 return true; | 2147 return true; |
| 2158 } | 2148 } |
| 2159 } | 2149 } |
| OLD | NEW |