| Index: pkg/kernel/testcases/closures/non_void_context.dart.expect
|
| diff --git a/pkg/kernel/testcases/closures/non_void_context.dart.expect b/pkg/kernel/testcases/closures/non_void_context.dart.expect
|
| index cdf05df66b12a38e431f7f7a2c19e95f811ee82b..f7a40d6a77ee84bdd7fe6427556af07c33e712bb 100644
|
| --- a/pkg/kernel/testcases/closures/non_void_context.dart.expect
|
| +++ b/pkg/kernel/testcases/closures/non_void_context.dart.expect
|
| @@ -1,51 +1,50 @@
|
| library;
|
| import self as self;
|
| import "dart:core" as core;
|
| -import "dart:mock" as mock;
|
|
|
| class Closure#main#function extends core::Object implements core::Function {
|
| field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - field mock::Context context;
|
| - constructor •(final mock::Context context) → dynamic
|
| + field Vector context;
|
| + constructor •(final Vector context) → dynamic
|
| : self::Closure#main#function::context = context
|
| ;
|
| method call(dynamic x) → dynamic {
|
| "This is a temporary solution. In the VM, this will become an additional parameter.";
|
| - final mock::Context #contextParameter = this.{self::Closure#main#function::context};
|
| - return self::v = let final dynamic #t1 = #contextParameter in let final dynamic #t2 = 0 in let final dynamic #t3 = x in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3;
|
| + final Vector #contextParameter = this.{self::Closure#main#function::context};
|
| + return self::v = #contextParameter[1] = x;
|
| }
|
| }
|
| class Closure#main#function#1 extends core::Object implements core::Function {
|
| field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - field mock::Context context;
|
| - constructor •(final mock::Context context) → dynamic
|
| + field Vector context;
|
| + constructor •(final Vector context) → dynamic
|
| : self::Closure#main#function#1::context = context
|
| ;
|
| method call() → dynamic {
|
| "This is a temporary solution. In the VM, this will become an additional parameter.";
|
| - final mock::Context #contextParameter = this.{self::Closure#main#function#1::context};
|
| - 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; ) {
|
| + final Vector #contextParameter = this.{self::Closure#main#function#1::context};
|
| + for (; #contextParameter[1] = self::v; ) {
|
| self::v = false;
|
| }
|
| }
|
| }
|
| static field dynamic v = null;
|
| static method main(dynamic arguments) → dynamic {
|
| - final mock::Context #context = new mock::Context::•(1);
|
| - #context.[]=(0, null);
|
| + final Vector #context = MakeVector(2);
|
| + #context[1] = null;
|
| new self::Closure#main#function::•(#context).call(87);
|
| if(!self::v.==(87)) {
|
| throw "Unexpected value in v: ${self::v}";
|
| }
|
| - if(!#context.[](0).==(87)) {
|
| - throw "Unexpected value in w: ${#context.[](0)}";
|
| + if(!(#context[1]).==(87)) {
|
| + throw "Unexpected value in w: ${#context[1]}";
|
| }
|
| self::v = true;
|
| new self::Closure#main#function#1::•(#context).call();
|
| if(!self::v.==(false)) {
|
| throw "Unexpected value in v: ${self::v}";
|
| }
|
| - if(!#context.[](0).==(false)) {
|
| - throw "Unexpected value in w: ${#context.[](0)}";
|
| + if(!(#context[1]).==(false)) {
|
| + throw "Unexpected value in w: ${#context[1]}";
|
| }
|
| }
|
|
|