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

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

Issue 2716573002: closure conversion: Do not set Context.parent if the value is `null` (Closed)
Patch Set: Created 3 years, 9 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 Closure#main#f extends core::Object implements core::Function { 6 class Closure#main#f extends core::Object implements core::Function {
7 field core::String note = "This is temporary. The VM doesn't need closure clas ses."; 7 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
8 field mock::Context context; 8 field mock::Context context;
9 constructor •(final mock::Context context) → dynamic 9 constructor •(final mock::Context context) → dynamic
10 : self::Closure#main#f::context = context 10 : self::Closure#main#f::context = context
(...skipping 11 matching lines...) Expand all
22 : self::Closure#main#g::context = context 22 : self::Closure#main#g::context = context
23 ; 23 ;
24 method call() → dynamic { 24 method call() → dynamic {
25 "This is a temporary solution. In the VM, this will become an additional par ameter."; 25 "This is a temporary solution. In the VM, this will become an additional par ameter.";
26 final mock::Context #contextParameter = this.{self::Closure#main#g::context} ; 26 final mock::Context #contextParameter = this.{self::Closure#main#g::context} ;
27 return #contextParameter.[](0).call(); 27 return #contextParameter.[](0).call();
28 } 28 }
29 } 29 }
30 static method main(dynamic arguments) → dynamic { 30 static method main(dynamic arguments) → dynamic {
31 final mock::Context #context = new mock::Context::•(1); 31 final mock::Context #context = new mock::Context::•(1);
32 #context.parent = null;
33 #context.[]=(0, new self::Closure#main#f::•(#context)); 32 #context.[]=(0, new self::Closure#main#f::•(#context));
34 final () → dynamic g = new self::Closure#main#g::•(#context); 33 final () → dynamic g = new self::Closure#main#g::•(#context);
35 g.call(); 34 g.call();
36 } 35 }
OLDNEW
« no previous file with comments | « pkg/kernel/lib/transformations/closure/rewriter.dart ('k') | pkg/kernel/testcases/closures/capture_this.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698