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

Side by Side Diff: pkg/kernel/testcases/closures/non_void_context.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 Closure#main#function extends core::Object implements core::Function { 6 class Closure#main#function 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#function::context = context 10 : self::Closure#main#function::context = context
(...skipping 14 matching lines...) Expand all
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#function#1: :context}; 26 final mock::Context #contextParameter = this.{self::Closure#main#function#1: :context};
27 for (; let final dynamic #t5 = #contextParameter in let final dynamic #t6 = 0 in let final dynamic #t7 = self::v in let final dynamic #t8 = #t5.[]=(#t6, #t7 ) in #t7; ) { 27 for (; let final dynamic #t5 = #contextParameter in let final dynamic #t6 = 0 in let final dynamic #t7 = self::v in let final dynamic #t8 = #t5.[]=(#t6, #t7 ) in #t7; ) {
28 self::v = false; 28 self::v = false;
29 } 29 }
30 } 30 }
31 } 31 }
32 static field dynamic v = null; 32 static field dynamic v = null;
33 static method main(dynamic arguments) → dynamic { 33 static method main(dynamic arguments) → dynamic {
34 final mock::Context #context = new mock::Context::•(1); 34 final mock::Context #context = new mock::Context::•(1);
35 #context.parent = null;
36 #context.[]=(0, null); 35 #context.[]=(0, null);
37 new self::Closure#main#function::•(#context).call(87); 36 new self::Closure#main#function::•(#context).call(87);
38 if(!self::v.==(87)) { 37 if(!self::v.==(87)) {
39 throw "Unexpected value in v: ${self::v}"; 38 throw "Unexpected value in v: ${self::v}";
40 } 39 }
41 if(!#context.[](0).==(87)) { 40 if(!#context.[](0).==(87)) {
42 throw "Unexpected value in w: ${#context.[](0)}"; 41 throw "Unexpected value in w: ${#context.[](0)}";
43 } 42 }
44 self::v = true; 43 self::v = true;
45 new self::Closure#main#function#1::•(#context).call(); 44 new self::Closure#main#function#1::•(#context).call();
46 if(!self::v.==(false)) { 45 if(!self::v.==(false)) {
47 throw "Unexpected value in v: ${self::v}"; 46 throw "Unexpected value in v: ${self::v}";
48 } 47 }
49 if(!#context.[](0).==(false)) { 48 if(!#context.[](0).==(false)) {
50 throw "Unexpected value in w: ${#context.[](0)}"; 49 throw "Unexpected value in w: ${#context.[](0)}";
51 } 50 }
52 } 51 }
OLDNEW
« no previous file with comments | « pkg/kernel/testcases/closures/named_closure.dart.expect ('k') | pkg/kernel/testcases/closures/type_variables.dart.expect » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698