| Index: pkg/kernel/testcases/reify/closure_test.dart.expect
|
| diff --git a/pkg/kernel/testcases/reify/closure_test.dart.expect b/pkg/kernel/testcases/reify/closure_test.dart.expect
|
| index 50134be7056b927c3a65183b54880fdb52b46dbf..0b759eb693b445276a7727dc53f38dfd21cc587a 100644
|
| --- a/pkg/kernel/testcases/reify/closure_test.dart.expect
|
| +++ b/pkg/kernel/testcases/reify/closure_test.dart.expect
|
| @@ -58,24 +58,6 @@ class Closure#bar extends core::Object implements core::Function, int::HasRuntim
|
| get $type() → typ::ReifiedType
|
| return new typ::Interface::•(self::$declarations.[](4));
|
| }
|
| -class Closure#bar extends core::Object implements core::Function, int::HasRuntimeTypeGetter {
|
| - field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - constructor •() → dynamic
|
| - ;
|
| - method call(self::A a) → dynamic
|
| - return self::bar(a);
|
| - get $type() → typ::ReifiedType
|
| - return new typ::Interface::•(self::$declarations.[](5));
|
| -}
|
| -class Closure#baz extends core::Object implements core::Function, int::HasRuntimeTypeGetter {
|
| - field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - constructor •() → dynamic
|
| - ;
|
| - method call(dynamic a) → self::B
|
| - return self::baz(a);
|
| - get $type() → typ::ReifiedType
|
| - return new typ::Interface::•(self::$declarations.[](6));
|
| -}
|
| class Closure#baz extends core::Object implements core::Function, int::HasRuntimeTypeGetter {
|
| field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| constructor •() → dynamic
|
| @@ -83,59 +65,37 @@ class Closure#baz extends core::Object implements core::Function, int::HasRuntim
|
| method call(dynamic a) → self::B
|
| return self::baz(a);
|
| get $type() → typ::ReifiedType
|
| - return new typ::Interface::•(self::$declarations.[](7));
|
| -}
|
| -class Closure#bar extends core::Object implements core::Function, int::HasRuntimeTypeGetter {
|
| - field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - constructor •() → dynamic
|
| - ;
|
| - method call(self::A a) → dynamic
|
| - return self::bar(a);
|
| - get $type() → typ::ReifiedType
|
| - return new typ::Interface::•(self::$declarations.[](8));
|
| -}
|
| -class Closure#baz extends core::Object implements core::Function, int::HasRuntimeTypeGetter {
|
| - field core::String note = "This is temporary. The VM doesn't need closure classes.";
|
| - constructor •() → dynamic
|
| - ;
|
| - method call(dynamic a) → self::B
|
| - return self::baz(a);
|
| - get $type() → typ::ReifiedType
|
| - return new typ::Interface::•(self::$declarations.[](9));
|
| + return new typ::Interface::•(self::$declarations.[](5));
|
| }
|
| static final field core::List<dec::Class> $declarations = (core::List<dec::Class> d) → core::List<dec::Class> {
|
| - dec::init(d, 0, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 1, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 2, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), new typ::Interface::•(d.[](1)), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| - dec::init(d, 3, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), new typ::Interface::•(d.[](0)), 0, <dynamic>[new typ::Interface::•(d.[](1))]));
|
| - dec::init(d, 4, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), const typ::Dynamic::•(), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| - dec::init(d, 5, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), const typ::Dynamic::•(), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| - dec::init(d, 6, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), new typ::Interface::•(d.[](1)), 0, <dynamic>[const typ::Dynamic::•()]));
|
| - dec::init(d, 7, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), new typ::Interface::•(d.[](1)), 0, <dynamic>[const typ::Dynamic::•()]));
|
| - dec::init(d, 8, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), const typ::Dynamic::•(), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| - dec::init(d, 9, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](10))], new typ::FunctionType::•(new typ::Interface::•(d.[](10)), new typ::Interface::•(d.[](1)), 0, <dynamic>[const typ::Dynamic::•()]));
|
| + dec::init(d, 0, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 1, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 2, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](6))], new typ::FunctionType::•(new typ::Interface::•(d.[](6)), new typ::Interface::•(d.[](1)), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| + dec::init(d, 3, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](6))], new typ::FunctionType::•(new typ::Interface::•(d.[](6)), new typ::Interface::•(d.[](0)), 0, <dynamic>[new typ::Interface::•(d.[](1))]));
|
| + dec::init(d, 4, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](6))], new typ::FunctionType::•(new typ::Interface::•(d.[](6)), const typ::Dynamic::•(), 0, <dynamic>[new typ::Interface::•(d.[](0))]));
|
| + dec::init(d, 5, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](6))], new typ::FunctionType::•(new typ::Interface::•(d.[](6)), new typ::Interface::•(d.[](1)), 0, <dynamic>[const typ::Dynamic::•()]));
|
| + dec::init(d, 6, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 7, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 8, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 9, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](22), <dynamic>[new typ::Interface::•(d.[](9))]), new typ::Interface::•(d.[](23))]);
|
| dec::init(d, 10, new typ::Interface::•(d.[](24)));
|
| dec::init(d, 11, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 12, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 13, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](26), <dynamic>[new typ::Interface::•(d.[](13))]), new typ::Interface::•(d.[](27))]);
|
| - dec::init(d, 14, new typ::Interface::•(d.[](28)));
|
| - dec::init(d, 15, new typ::Interface::•(d.[](28)));
|
| - dec::init(d, 16, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 17, new typ::Interface::•(d.[](29)));
|
| - dec::init(d, 18, new typ::Interface::•(d.[](29)));
|
| - dec::init(d, 19, new typ::Interface::•(d.[](29)));
|
| - dec::init(d, 20, new typ::Interface::•(d.[](29)));
|
| - dec::init(d, 21, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](30))]);
|
| - dec::init(d, 22, new typ::Interface::•(d.[](23)));
|
| - dec::init(d, 23, new typ::Interface::•(d.[](29)));
|
| - dec::init(d, 24, null);
|
| - dec::init(d, 26, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 27, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 28, new typ::Interface::•(d.[](24)), <dynamic>[new typ::Interface::•(d.[](26), <dynamic>[new typ::Interface::•(d.[](28))])]);
|
| - dec::init(d, 29, new typ::Interface::•(d.[](24)));
|
| - dec::init(d, 30, new typ::Interface::•(d.[](24)));
|
| + dec::init(d, 12, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 13, new typ::Interface::•(d.[](25)));
|
| + dec::init(d, 14, new typ::Interface::•(d.[](25)));
|
| + dec::init(d, 15, new typ::Interface::•(d.[](25)));
|
| + dec::init(d, 16, new typ::Interface::•(d.[](25)));
|
| + dec::init(d, 17, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](26))]);
|
| + dec::init(d, 18, new typ::Interface::•(d.[](19)));
|
| + dec::init(d, 19, new typ::Interface::•(d.[](25)));
|
| + dec::init(d, 20, null);
|
| + dec::init(d, 22, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 23, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 24, new typ::Interface::•(d.[](20)), <dynamic>[new typ::Interface::•(d.[](22), <dynamic>[new typ::Interface::•(d.[](24))])]);
|
| + dec::init(d, 25, new typ::Interface::•(d.[](20)));
|
| + dec::init(d, 26, new typ::Interface::•(d.[](20)));
|
| return d;
|
| -}.call(dec::allocateDeclarations(<dynamic>["A", "B", "Closure#main#foo", "Closure#main#qux", "Closure#bar", "Closure#bar", "Closure#baz", "Closure#baz", "Closure#bar", "Closure#baz", "Function", "Null", "bool", "String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuchMethodError", "CyclicInitializationError", "UnsupportedError", "IntegerDivisionByZeroException", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter", "Comparable", "Pattern", "num", "Error", "Exception"], <dynamic>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]));
|
| +}.call(dec::allocateDeclarations(<dynamic>["A", "B", "Closure#main#foo", "Closure#main#qux", "Closure#bar", "Closure#baz", "Function", "Null", "bool", "String", "int", "double", "Type", "AbstractClassInstantiationError", "NoSuchMethodError", "CyclicInitializationError", "UnsupportedError", "IntegerDivisionByZeroException", "RangeError", "ArgumentError", "Object", "HasRuntimeTypeGetter", "Comparable", "Pattern", "num", "Error", "Exception"], <dynamic>[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0]));
|
| static method bar(self::A a) → dynamic {
|
| return null;
|
| }
|
| @@ -145,18 +105,18 @@ static method baz(dynamic a) → self::B {
|
| static method main() → dynamic {
|
| final (self::A) → self::B foo = new self::Closure#main#foo::•(null);
|
| final (self::B) → self::A qux = new self::Closure#main#qux::•(null);
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(foo), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(qux), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(foo), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(qux), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(new self::Closure#bar::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(new self::Closure#bar::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(new self::Closure#baz::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(new self::Closure#baz::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| - dynamic rab = new self::Closure#bar::•();
|
| - dynamic zab = new self::Closure#baz::•();
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(rab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(rab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| - tes::expectTrue(typ::isSubtypeOf(int::type(zab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| - tes::expectTrue(!typ::isSubtypeOf(int::type(zab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](10)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(foo), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(qux), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(foo), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(qux), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(new self::Closure#bar::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(new self::Closure#bar::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(new self::Closure#baz::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(new self::Closure#baz::•()), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + (self::A) → dynamic rab = new self::Closure#bar::•();
|
| + (dynamic) → self::B zab = new self::Closure#baz::•();
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(rab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(rab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| + tes::expectTrue(typ::isSubtypeOf(int::type(zab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](1)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](0))])));
|
| + tes::expectTrue(!typ::isSubtypeOf(int::type(zab), new typ::FunctionType::•(new typ::Interface::•(self::$declarations.[](6)), new typ::Interface::•(self::$declarations.[](0)), 0, <dynamic>[new typ::Interface::•(self::$declarations.[](1))])));
|
| }
|
|
|