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

Side by Side 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 unified diff | Download patch
OLDNEW
1 library test; 1 library test;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:async" as asy; 4 import "dart:async" as asy;
5 5
6 class MyFuture<T extends core::Object> extends core::Object implements asy::Futu re<self::MyFuture::T> { 6 class MyFuture<T extends core::Object> extends core::Object implements asy::Futu re<self::MyFuture::T> {
7 constructor •() → void 7 constructor •() → void
8 : super core::Object::•() {} 8 : super core::Object::•() {}
9 constructor value(self::MyFuture::T x) → void 9 constructor value(self::MyFuture::T x) → void
10 : super core::Object::•() {} 10 : super core::Object::•() {}
11 abstract method noSuchMethod(dynamic invocation) → dynamic; 11 abstract method noSuchMethod(dynamic invocation) → dynamic;
12 method then<S extends core::Object>((self::MyFuture::T) → asy::FutureOr<self:: MyFuture::then::S> f, {core::Function onError = null}) → self::MyFuture<self::My Future::then::S> 12 method then<S extends core::Object>((self::MyFuture::T) → asy::FutureOr<self:: MyFuture::then::S> f, {core::Function onError = null}) → self::MyFuture<self::My Future::then::S>
13 return null; 13 return null;
14 } 14 }
15 static method test() → void { 15 static method test() → void {
16 self::MyFuture<dynamic> f; 16 self::MyFuture<dynamic> f;
17 self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ { 17 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) );
18 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>(); 18 self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
19 asy::FutureOr<core::int> :return_value; 19 return await new self::MyFuture::value<core::int>(3);
20 dynamic :async_op_then;
21 dynamic :async_op_error;
22 dynamic :await_jump_var = 0;
23 dynamic :await_ctx_var;
24 dynamic :saved_try_context_var0;
25 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
26 try {
27 #L1:
28 {
29 asy::_awaitHelper(new self::MyFuture::value<core::int>(3), :async_op_t hen, :async_op_error, :async_op);
30 [yield] null;
31 :return_value = :result;
32 break #L1;
33 }
34 :completer.complete(:return_value);
35 return;
36 }
37 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
38 :completer.completeError(:exception, :stack_trace);
39 }
40 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
41 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
42 asy::Future::microtask<dynamic>(:async_op);
43 return :completer.future;
44 }); 20 });
45 self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ { 21 self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async => 3);
46 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>(); 22 self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
47 asy::FutureOr<core::int> :return_value; 23 return 3;
48 dynamic :async_op_then;
49 dynamic :async_op_error;
50 dynamic :await_jump_var = 0;
51 dynamic :await_ctx_var;
52 dynamic :saved_try_context_var0;
53 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
54 try {
55 #L2:
56 {
57 asy::_awaitHelper(new self::MyFuture::value<core::int>(3), :async_op_t hen, :async_op_error, :async_op);
58 [yield] null;
59 :return_value = :result;
60 break #L2;
61 }
62 :completer.complete(:return_value);
63 return;
64 }
65 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
66 :completer.completeError(:exception, :stack_trace);
67 }
68 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
69 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
70 asy::Future::microtask<dynamic>(:async_op);
71 return :completer.future;
72 });
73 self::MyFuture<core::int> t3 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
74 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>();
75 asy::FutureOr<core::int> :return_value;
76 dynamic :async_op_then;
77 dynamic :async_op_error;
78 dynamic :await_jump_var = 0;
79 dynamic :await_ctx_var;
80 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
81 try {
82 #L3:
83 {
84 :return_value = 3;
85 break #L3;
86 }
87 :completer.complete(:return_value);
88 return;
89 }
90 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
91 :completer.completeError(:exception, :stack_trace);
92 }
93 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
94 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
95 asy::Future::microtask<dynamic>(:async_op);
96 return :completer.future;
97 });
98 self::MyFuture<core::int> t4 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
99 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>();
100 asy::FutureOr<core::int> :return_value;
101 dynamic :async_op_then;
102 dynamic :async_op_error;
103 dynamic :await_jump_var = 0;
104 dynamic :await_ctx_var;
105 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
106 try {
107 #L4:
108 {
109 :return_value = 3;
110 break #L4;
111 }
112 :completer.complete(:return_value);
113 return;
114 }
115 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
116 :completer.completeError(:exception, :stack_trace);
117 }
118 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
119 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
120 asy::Future::microtask<dynamic>(:async_op);
121 return :completer.future;
122 }); 24 });
123 self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3)); 25 self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> => new self::MyFuture::value<core::int>(3));
124 self::MyFuture<core::int> t6 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> { 26 self::MyFuture<core::int> t6 = f.{self::MyFuture::then}<core::int>((dynamic _) → self::MyFuture<core::int> {
125 return new self::MyFuture::value<core::int>(3); 27 return new self::MyFuture::value<core::int>(3);
126 }); 28 });
127 self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ { 29 self::MyFuture<core::int> t7 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async => new self::MyFuture::value<core::int>(3));
128 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>(); 30 self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> async {
129 asy::FutureOr<core::int> :return_value; 31 return new self::MyFuture::value<core::int>(3);
130 dynamic :async_op_then;
131 dynamic :async_op_error;
132 dynamic :await_jump_var = 0;
133 dynamic :await_ctx_var;
134 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
135 try {
136 #L5:
137 {
138 :return_value = new self::MyFuture::value<core::int>(3);
139 break #L5;
140 }
141 :completer.complete(:return_value);
142 return;
143 }
144 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
145 :completer.completeError(:exception, :stack_trace);
146 }
147 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
148 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
149 asy::Future::microtask<dynamic>(:async_op);
150 return :completer.future;
151 });
152 self::MyFuture<core::int> t8 = f.{self::MyFuture::then}<core::int>((dynamic _) → asy::Future<core::int> /* originally async */ {
153 final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer:: sync<asy::FutureOr<core::int>>();
154 asy::FutureOr<core::int> :return_value;
155 dynamic :async_op_then;
156 dynamic :async_op_error;
157 dynamic :await_jump_var = 0;
158 dynamic :await_ctx_var;
159 function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trac e]) → dynamic yielding
160 try {
161 #L6:
162 {
163 :return_value = new self::MyFuture::value<core::int>(3);
164 break #L6;
165 }
166 :completer.complete(:return_value);
167 return;
168 }
169 on dynamic catch(dynamic :exception, dynamic :stack_trace) {
170 :completer.completeError(:exception, :stack_trace);
171 }
172 :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
173 :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
174 asy::Future::microtask<dynamic>(:async_op);
175 return :completer.future;
176 }); 32 });
177 } 33 }
178 static method main() → dynamic {} 34 static method main() → dynamic {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698