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

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

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Add a note to return Run step in Closure Conversion test suite 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;
5 4
6 class Closure#main#function extends core::Object implements core::Function { 5 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."; 6 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
8 field mock::Context context; 7 field Vector context;
9 constructor •(final mock::Context context) → dynamic 8 constructor •(final Vector context) → dynamic
10 : self::Closure#main#function::context = context 9 : self::Closure#main#function::context = context
11 ; 10 ;
12 method call(dynamic x) → dynamic { 11 method call(dynamic x) → dynamic {
13 "This is a temporary solution. In the VM, this will become an additional par ameter."; 12 "This is a temporary solution. In the VM, this will become an additional par ameter.";
14 final mock::Context #contextParameter = this.{self::Closure#main#function::c ontext}; 13 final Vector #contextParameter = this.{self::Closure#main#function::context} ;
15 return self::v = let final dynamic #t1 = #contextParameter in let final dyna mic #t2 = 0 in let final dynamic #t3 = x in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3; 14 return self::v = #contextParameter[1] = x;
16 } 15 }
17 } 16 }
18 class Closure#main#function#1 extends core::Object implements core::Function { 17 class Closure#main#function#1 extends core::Object implements core::Function {
19 field core::String note = "This is temporary. The VM doesn't need closure clas ses."; 18 field core::String note = "This is temporary. The VM doesn't need closure clas ses.";
20 field mock::Context context; 19 field Vector context;
21 constructor •(final mock::Context context) → dynamic 20 constructor •(final Vector context) → dynamic
22 : self::Closure#main#function#1::context = context 21 : self::Closure#main#function#1::context = context
23 ; 22 ;
24 method call() → dynamic { 23 method call() → dynamic {
25 "This is a temporary solution. In the VM, this will become an additional par ameter."; 24 "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}; 25 final Vector #contextParameter = this.{self::Closure#main#function#1::contex t};
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; ) { 26 for (; #contextParameter[1] = self::v; ) {
28 self::v = false; 27 self::v = false;
29 } 28 }
30 } 29 }
31 } 30 }
32 static field dynamic v = null; 31 static field dynamic v = null;
33 static method main(dynamic arguments) → dynamic { 32 static method main(dynamic arguments) → dynamic {
34 final mock::Context #context = new mock::Context::•(1); 33 final Vector #context = MakeVector(2);
35 #context.[]=(0, null); 34 #context[1] = null;
36 new self::Closure#main#function::•(#context).call(87); 35 new self::Closure#main#function::•(#context).call(87);
37 if(!self::v.==(87)) { 36 if(!self::v.==(87)) {
38 throw "Unexpected value in v: ${self::v}"; 37 throw "Unexpected value in v: ${self::v}";
39 } 38 }
40 if(!#context.[](0).==(87)) { 39 if(!(#context[1]).==(87)) {
41 throw "Unexpected value in w: ${#context.[](0)}"; 40 throw "Unexpected value in w: ${#context[1]}";
42 } 41 }
43 self::v = true; 42 self::v = true;
44 new self::Closure#main#function#1::•(#context).call(); 43 new self::Closure#main#function#1::•(#context).call();
45 if(!self::v.==(false)) { 44 if(!self::v.==(false)) {
46 throw "Unexpected value in v: ${self::v}"; 45 throw "Unexpected value in v: ${self::v}";
47 } 46 }
48 if(!#context.[](0).==(false)) { 47 if(!(#context[1]).==(false)) {
49 throw "Unexpected value in w: ${#context.[](0)}"; 48 throw "Unexpected value in w: ${#context[1]}";
50 } 49 }
51 } 50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698