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

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

Issue 3007623002: Fix many bugs with closure conversion in checked mode. (Closed)
Patch Set: Review 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
OLDNEW
1 library; 1 library;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 4
5 class C extends core::Object { 5 class C extends core::Object {
6 field dynamic t; 6 field dynamic t;
7 constructor foo(dynamic f, dynamic x) → void 7 constructor foo(dynamic f, dynamic x) → void
8 : final Vector #context = MakeVector(4), this self::C::foo#redir(f, x, #cont ext) 8 : final dynamic #context = MakeVector(4), this self::C::foo#redir(f, x, #con text)
9 ; 9 ;
10 constructor foo#redir(dynamic f, dynamic x, final Vector #context) → void 10 constructor foo#redir(dynamic f, dynamic x, final dynamic #context) → void
11 : dynamic #t1 = #context[2] = f, dynamic #t2 = #context[3] = x, self::C::t = MakeClosure<() → dynamic>(self::closure#C#foo#function, #context), super core:: Object::•() { 11 : dynamic #t1 = #context[2] = f, dynamic #t2 = #context[3] = x, self::C::t = MakeClosure<() → dynamic>(self::closure#C#foo#function, #context), super core:: Object::•() {
12 #context[3] = 1; 12 #context[3] = 1;
13 core::print(#context[3]); 13 core::print(#context[3]);
14 } 14 }
15 } 15 }
16 static method main() → dynamic { 16 static method main() → dynamic {
17 core::print(0); 17 core::print(0);
18 dynamic c = new self::C::foo(MakeClosure<(dynamic) → dynamic>(self::closure#ma in#function, null), 0); 18 dynamic c = new self::C::foo(MakeClosure<(dynamic) → dynamic>(self::closure#ma in#function, null), 0);
19 core::print(2); 19 core::print(2);
20 c.t(); 20 c.t();
21 core::print(3); 21 core::print(3);
22 } 22 }
23 static method closure#C#foo#function(Vector #contextParameter) → dynamic { 23 static method closure#C#foo#function(dynamic #contextParameter) → dynamic {
24 return (#contextParameter[2]).call(#contextParameter[3]); 24 return (#contextParameter[2]).call(#contextParameter[3]);
25 } 25 }
26 static method closure#main#function(Vector #contextParameter, dynamic x) → dynam ic { 26 static method closure#main#function(dynamic #contextParameter, dynamic x) → dyna mic {
27 return core::print("hest${x}"); 27 return core::print("hest${x}");
28 } 28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698