Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(778)

Unified Diff: tests/compiler/dart2js/async_await_js_transform_test.dart

Issue 953283003: Refactor rewrite_async (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: One more Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/async_await_js_transform_test.dart
diff --git a/tests/compiler/dart2js/async_await_js_transform_test.dart b/tests/compiler/dart2js/async_await_js_transform_test.dart
index e427ea05faf2496e879cb2aa239306ced295e6ab..78caf4469ba9ea61aad882b03fef81c4657739c5 100644
--- a/tests/compiler/dart2js/async_await_js_transform_test.dart
+++ b/tests/compiler/dart2js/async_await_js_transform_test.dart
@@ -15,8 +15,6 @@ void testTransform(String source, String expected) {
null,
asyncHelper: new VariableUse("thenHelper"),
newCompleter: new VariableUse("Completer"),
- endOfIteration: new VariableUse("endOfIteration"),
- newIterable: new VariableUse("Iterator"),
safeVariableName: (String name) => "__$name").rewrite(fun);
JavaScriptPrintingOptions options = new JavaScriptPrintingOptions();
@@ -84,7 +82,7 @@ function(a) {
return 4;
}""", """
function(b) {
- var __goto = 0, __completer = new Completer(), __handler = 2, __currentError, __next, __returnValue, __helper;
+ var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, __next, __helper;
function __body(__errorCode, __result) {
if (__errorCode === 1) {
__currentError = __result;
@@ -542,7 +540,7 @@ function(g) async {
}
""", """
function(g) {
- var __goto = 0, __completer = new Completer(), __handler = 2, __currentError, __returnValue, i, __temp1;
+ var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, i, __temp1;
function __body(__errorCode, __result) {
if (__errorCode === 1) {
__currentError = __result;
@@ -708,7 +706,7 @@ function(c, i) async {
}
""", """
function(c, i) {
- var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __next, x, y, __error1, __error2;
+ var __goto = 0, __completer = new Completer(), __handler = 1, __currentError, __next, x, y, __error, __error1;
function __body(__errorCode, __result) {
if (__errorCode === 1) {
__currentError = __result;
@@ -744,14 +742,14 @@ function(c, i) {
case 3:
// catch
__handler = 2;
- __error1 = __currentError;
+ __error = __currentError;
__handler = 11;
__goto = c ? 14 : 16;
break;
case 14:
// then
__goto = 17;
- return thenHelper(fooError(__error1), __body, __completer);
+ return thenHelper(fooError(__error), __body, __completer);
case 17:
// returning from await.
// goto join
@@ -759,7 +757,7 @@ function(c, i) {
break;
case 16:
// else
- __result = fooError(__error1);
+ __result = fooError(__error);
case 15:
// join
x = __result;
@@ -770,8 +768,8 @@ function(c, i) {
case 11:
// catch
__handler = 10;
- __error2 = __currentError;
- y.x = foo(__error2);
+ __error1 = __currentError;
+ y.x = foo(__error1);
__next = [13];
// goto finally
__goto = 12;
@@ -901,7 +899,7 @@ function(x, y, k) async {
}
}""", """
function(x, y, k) {
- var __goto = 0, __completer = new Completer(), __handler = 2, __currentError, __returnValue, __temp1;
+ var __goto = 0, __completer = new Completer(), __returnValue, __handler = 2, __currentError, __temp1;
function __body(__errorCode, __result) {
if (__errorCode === 1) {
__currentError = __result;
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698