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

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

Issue 2716573002: closure conversion: Do not set Context.parent if the value is `null` (Closed)
Patch Set: Created 3 years, 10 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 import "dart:mock" as mock; 4 import "dart:mock" as mock;
5 5
6 class C extends core::Object { 6 class C extends core::Object {
7 field dynamic t; 7 field dynamic t;
8 constructor foo(dynamic f) → void 8 constructor foo(dynamic f) → void
9 : self::C::t = let final mock::Context #context = new mock::Context::•(1) in let dynamic #t1 = #context.[]=(0, f) in new self::Closure#C#foo#function::•(#co ntext), super core::Object::•() { 9 : self::C::t = let final mock::Context #context = new mock::Context::•(1) in let dynamic #t1 = #context.[]=(0, f) in new self::Closure#C#foo#function::•(#co ntext), super core::Object::•() {
10 final mock::Context #context = new mock::Context::•(1); 10 final mock::Context #context = new mock::Context::•(1);
11 #context.parent = null;
12 #context.[]=(0, f); 11 #context.[]=(0, f);
13 core::print(1); 12 core::print(1);
14 } 13 }
15 } 14 }
16 class Closure#C#foo#function extends core::Object implements core::Function { 15 class Closure#C#foo#function extends core::Object implements core::Function {
17 field core::String note = "This is temporary. The VM doesn't need closure clas ses."; 16 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
18 field mock::Context context; 17 field mock::Context context;
19 constructor •(final mock::Context context) → dynamic 18 constructor •(final mock::Context context) → dynamic
20 : self::Closure#C#foo#function::context = context 19 : self::Closure#C#foo#function::context = context
21 ; 20 ;
(...skipping 15 matching lines...) Expand all
37 return core::print("hest"); 36 return core::print("hest");
38 } 37 }
39 } 38 }
40 static method main() → dynamic { 39 static method main() → dynamic {
41 core::print(0); 40 core::print(0);
42 dynamic c = new self::C::foo(new self::Closure#main#function::•(null)); 41 dynamic c = new self::C::foo(new self::Closure#main#function::•(null));
43 core::print(2); 42 core::print(2);
44 c.t(); 43 c.t();
45 core::print(3); 44 core::print(3);
46 } 45 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698