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

Unified Diff: pkg/front_end/testcases/inference/future_then_4.dart.strong.expect

Issue 2939533002: Apply transformations after comparing to golden files. (Closed)
Patch Set: Created 3 years, 6 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
Index: pkg/front_end/testcases/inference/future_then_4.dart.strong.expect
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.strong.expect b/pkg/front_end/testcases/inference/future_then_4.dart.strong.expect
index 84e04ac87d5e7b87cfd932ae1c4ca693360961d1..8523342f8660a06ba344930df66d7b42d44888a1 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.strong.expect
@@ -14,165 +14,21 @@ class MyFuture<T extends core::Object> extends core::Object implements asy::Futu
}
static method test() → void {
self::MyFuture<dynamic> f;
- self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L1:
- {
- asy::_awaitHelper(new self::MyFuture::value<core::int>(3), :async_op_then, :async_op_error, :async_op);
- [yield] null;
- :return_value = :result;
- break #L1;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
+ self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async => await new self::MyFuture::value<core::int>(3));
+ self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
+ return await new self::MyFuture::value<core::int>(3);
});
- self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L2:
- {
- asy::_awaitHelper(new self::MyFuture::value<core::int>(3), :async_op_then, :async_op_error, :async_op);
- [yield] null;
- :return_value = :result;
- break #L2;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
- });
- self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L3:
- {
- :return_value = 3;
- break #L3;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
- });
- self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L4:
- {
- :return_value = 3;
- break #L4;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
+ self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async => 3);
+ self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
+ return 3;
});
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3));
self::MyFuture<core::int> t6 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> {
return new self::MyFuture::value<core::int>(3);
});
- self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L5:
- {
- :return_value = new self::MyFuture::value<core::int>(3);
- break #L5;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
- });
- self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L6:
- {
- :return_value = new self::MyFuture::value<core::int>(3);
- break #L6;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
+ self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async => new self::MyFuture::value<core::int>(3));
+ self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
+ return new self::MyFuture::value<core::int>(3);
});
}
static method main() → dynamic {}

Powered by Google App Engine
This is Rietveld 408576698