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

Unified Diff: pkg/kernel/testcases/closures/syncstar.dart.expect

Issue 3000333002: Fix several bugs in closure conversion. (Closed)
Patch Set: Comments. Created 3 years, 4 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/kernel/testcases/closures/syncstar.dart ('k') | runtime/vm/flow_graph_compiler_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/testcases/closures/syncstar.dart.expect
diff --git a/pkg/kernel/testcases/closures/syncstar.dart.expect b/pkg/kernel/testcases/closures/syncstar.dart.expect
new file mode 100644
index 0000000000000000000000000000000000000000..fef5334e3d87b6dd253259092bf4c960e0498539
--- /dev/null
+++ b/pkg/kernel/testcases/closures/syncstar.dart.expect
@@ -0,0 +1,35 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method range(core::int high) → dynamic {
+ final Vector #context = MakeVector(3);
+ #context[2] = high;
+ final (core::int) → dynamic iter = MakeClosure<(core::int) → dynamic>(self::closure#range#iter, #context);
+ return iter;
+}
+static method main() → dynamic {
+ dynamic sum = 0;
+ for (dynamic x in self::range(10).call(2))
+ sum = sum.+(x);
+ if(!sum.==(44)) {
+ throw core::Exception::•("Incorrect output.");
+ }
+}
+static method closure#range#iter(Vector #contextParameter, core::int low) → dynamic /* originally sync* */ {
+ final Vector #context = MakeVector(3);
+ #context[1] = #contextParameter;
+ #context[2] = low;
+ dynamic :await_jump_var = 0;
+ dynamic :await_ctx_var;
+ dynamic :sync_op = (core::Iterator<dynamic> :iterator) → core::bool yielding {
+ {
+ while ((let final dynamic #t1 = #contextParameter[2] in let final dynamic #t2 = #contextParameter[2] = #t1.-(1) in #t1).>(#context[2])) {
+ :iterator._current = #context[1][2];
+ [yield] true;
+ }
+ }
+ return false;
+ };
+ return new core::_SyncIterable::•(:sync_op);
+}
« 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