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

Side by Side Diff: pkg/kernel/testcases/closures/syncstar.dart.expect

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Comments. Created 3 years, 3 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
« no previous file with comments | « pkg/kernel/testcases/closures/syncstar.dart ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 library;
2 import self as self;
3 import "dart:core" as core;
4
5 static method range(core::int high) → dynamic {
6 final Vector #context = MakeVector(3);
7 #context[2] = high;
8 final (core::int) → dynamic iter = MakeClosure<(core::int) → dynamic>(self::cl osure#range#iter, #context);
9 return iter;
10 }
11 static method main() → dynamic {
12 dynamic sum = 0;
13 for (dynamic x in self::range(10).call(2))
14 sum = sum.+(x);
15 if(!sum.==(44)) {
16 throw core::Exception::•("Incorrect output.");
17 }
18 }
19 static method closure#range#iter(Vector #contextParameter, core::int low) → dyna mic /* originally sync* */ {
20 final Vector #context = MakeVector(3);
21 #context[1] = #contextParameter;
22 #context[2] = low;
23 dynamic :await_jump_var = 0;
24 dynamic :await_ctx_var;
25 dynamic :sync_op = (core::Iterator<dynamic> :iterator) → core::bool yielding {
26 {
27 while ((let final dynamic #t1 = #contextParameter[2] in let final dynamic #t2 = #contextParameter[2] = #t1.-(1) in #t1).>(#context[2])) {
28 :iterator._current = #context[1][2];
29 [yield] true;
30 }
31 }
32 return false;
33 };
34 return new core::_SyncIterable::•(:sync_op);
35 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/syncstar.dart ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698