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

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

Issue 3008923002: Improve the performance of closure-converted code. (Closed)
Patch Set: Additional bug fixes. 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 C1 extends core::Object { 5 class C1 extends core::Object {
6 field dynamic x; 6 field dynamic x;
7 constructor •(dynamic y) → void 7 constructor •(dynamic y) → void
8 : final dynamic #context = MakeVector(3), dynamic #t1 = #context[2] = y, sel f::C1::x = MakeClosure<() → dynamic>(self::closure#C1#function#function, #contex t), super core::Object::•() 8 : final dynamic #context = MakeVector(3), dynamic #t1 = #context[2] = y, dyn amic #t2 = y = null, self::C1::x = MakeClosure<() → dynamic>(self::closure#C1#fu nction#function, #context), super core::Object::•()
9 ; 9 ;
10 } 10 }
11 class C2 extends core::Object { 11 class C2 extends core::Object {
12 field dynamic x = null; 12 field dynamic x = null;
13 constructor •(dynamic y) → void 13 constructor •(dynamic y) → void
14 : super core::Object::•() { 14 : super core::Object::•() {
15 final dynamic #context = MakeVector(3); 15 final dynamic #context = MakeVector(3);
16 #context[2] = y; 16 #context[2] = y;
17 y = null;
17 this.x = MakeClosure<() → dynamic>(self::closure#C2#function#function, #cont ext); 18 this.x = MakeClosure<() → dynamic>(self::closure#C2#function#function, #cont ext);
18 } 19 }
19 } 20 }
20 static method main() → dynamic { 21 static method main() → dynamic {
21 new self::C1::•("hest").x(); 22 new self::C1::•("hest").x();
22 new self::C2::•("naebdyr").x(); 23 new self::C2::•("naebdyr").x();
23 } 24 }
24 static method closure#C1#function#function(dynamic #contextParameter) → dynamic { 25 static method closure#C1#function#function(dynamic #contextParameter) → dynamic {
25 return core::print("Hello ${#contextParameter[2]}"); 26 return core::print("Hello ${#contextParameter[2]}");
26 } 27 }
27 static method closure#C2#function#function(dynamic #contextParameter) → dynamic { 28 static method closure#C2#function#function(dynamic #contextParameter) → dynamic {
28 return core::print("Hello ${#contextParameter[2]}"); 29 return core::print("Hello ${#contextParameter[2]}");
29 } 30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698