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

Side by Side Diff: pkg/kernel/testcases/closures/capture_closure_parameter.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#foo#bar extends core::Object implements core::Function { 5 class Closure#main#foo#bar 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#foo#bar::context = context 9 : self::Closure#main#foo#bar::context = context
11 ; 10 ;
12 method call() → dynamic { 11 method call() → 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#foo#bar::co ntext}; 13 final Vector #contextParameter = this.{self::Closure#main#foo#bar::context};
15 core::print(#contextParameter.[](0)); 14 core::print(#contextParameter[1]);
16 } 15 }
17 } 16 }
18 class Closure#main#foo extends core::Object implements core::Function { 17 class Closure#main#foo 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#foo::context = context 21 : self::Closure#main#foo::context = context
23 ; 22 ;
24 method call(dynamic x) → dynamic { 23 method call(dynamic x) → 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#foo::contex t}; 25 final Vector #contextParameter = this.{self::Closure#main#foo::context};
27 final mock::Context #context = new mock::Context::•(1); 26 final Vector #context = MakeVector(2);
28 #context.parent = #contextParameter; 27 #context[0] = #contextParameter;
29 #context.[]=(0, null); 28 #context[1] = null;
30 final () → dynamic bar = new self::Closure#main#foo#bar::•(#context); 29 final () → dynamic bar = new self::Closure#main#foo#bar::•(#context);
31 return bar; 30 return bar;
32 } 31 }
33 } 32 }
34 static method main(core::List<core::String> arguments) → dynamic { 33 static method main(core::List<core::String> arguments) → dynamic {
35 final (dynamic) → dynamic foo = new self::Closure#main#foo::•(null); 34 final (dynamic) → dynamic foo = new self::Closure#main#foo::•(null);
36 foo.call(arguments.[](0)).call(); 35 foo.call(arguments.[](0)).call();
37 } 36 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698