library #lib; import self as self; import "dart:core" as core; import "dart:_internal" as _in; class Base extends core::Object { generic-covariant-impl field self::Base::T1 t1 = null; generic-covariant-impl field self::Base::T2 t2 = null; [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull PushInt 4 CreateArrayTOS StoreLocal r0 Push r0 PushInt 0 PushConstant CP#2 StoreIndexedTOS Push r0 PushInt 1 Push FP[-5] LoadTypeArgumentsField CP#4 PushNull InstantiateType CP#3 StoreIndexedTOS Push r0 PushInt 2 PushConstant CP#5 StoreIndexedTOS Push r0 PushInt 3 Push FP[-5] LoadTypeArgumentsField CP#4 PushNull InstantiateType CP#6 StoreIndexedTOS PushConstant CP#7 IndirectStaticCall 1, CP#0 PushConstant CP#8 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } Nullable fields: [#lib::Base::t1 (field), #lib::Base::t2 (field)]} ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target 'dart:core::Object::'' (constructor)', arg-desc CP#0 [2] = String 'Base: ' [3] = Type #lib::Base::TypeParam/0 [4] = TypeArgumentsField #lib::Base [5] = String ', ' [6] = Type #lib::Base::TypeParam/1 [7] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#0 [8] = StaticICData target 'dart:core::print', arg-desc CP#0 } ] constructor •() → self::Base : super core::Object::•() { core::print("Base: ${self::Base::T1}, ${self::Base::T2}"); } } class A extends self::Base { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-6] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::Base::'' (constructor)', arg-desc CP#0 } ] constructor •(core::String s) → self::A : super self::Base::•() ; } class B extends self::Base, core::String> { [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull PushInt 2 CreateArrayTOS StoreLocal r0 Push r0 PushInt 0 PushConstant CP#2 StoreIndexedTOS Push r0 PushInt 1 Push FP[-5] LoadTypeArgumentsField CP#4 PushNull InstantiateType CP#3 StoreIndexedTOS PushConstant CP#5 IndirectStaticCall 1, CP#0 PushConstant CP#6 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::Base::'' (constructor)', arg-desc CP#0 [2] = String 'B: ' [3] = Type #lib::B::TypeParam/0 [4] = TypeArgumentsField #lib::B [5] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#0 [6] = StaticICData target 'dart:core::print', arg-desc CP#0 } ] constructor •() → self::B : super self::Base::•() { core::print("B: ${self::B::T}"); } } class C extends core::Object { [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Push FP[-6] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull PushInt 2 CreateArrayTOS StoreLocal r0 Push r0 PushInt 0 PushConstant CP#2 StoreIndexedTOS Push r0 PushInt 1 Push FP[-5] StoreIndexedTOS PushConstant CP#3 IndirectStaticCall 1, CP#0 PushConstant CP#4 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target 'dart:core::Object::'' (constructor)', arg-desc CP#0 [2] = String 'C: ' [3] = StaticICData target 'dart:core::_StringBase::_interpolate', arg-desc CP#0 [4] = StaticICData target 'dart:core::print', arg-desc CP#0 } ] constructor •(core::String s) → self::C : super core::Object::•() { core::print("C: ${s}"); } } class E extends core::Object { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target 'dart:core::Object::'' (constructor)', arg-desc CP#0 } ] synthetic constructor •() → self::E : super core::Object::•() ; [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] LoadTypeArgumentsField CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 ReturnTOS } ConstantPool { [0] = TypeArgumentsField #lib::E [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart:core::Map::'' (constructor)', arg-desc CP#1 } ] method test_reuse1() → dynamic return core::Map::•(); } class F extends self::E> { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::E::'' (constructor)', arg-desc CP#0 } ] synthetic constructor •() → self::F : super self::E::•() ; [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] LoadTypeArgumentsField CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 ReturnTOS } ConstantPool { [0] = TypeArgumentsField #lib::F [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target 'dart:core::Map::'' (constructor)', arg-desc CP#1 } ] method test_reuse2() → dynamic return core::Map::•>(); } class G extends core::Object { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target 'dart:core::Object::'' (constructor)', arg-desc CP#0 } ] constructor •() → self::G : super core::Object::•() ; [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Push FP[-5] PushNull InstantiateTypeArgumentsTOS 0, CP#1 PushConstant CP#0 AllocateT StoreLocal r0 Push r0 PushConstant CP#3 IndirectStaticCall 1, CP#2 Drop1 ReturnTOS } ConstantPool { [0] = Class #lib::H [1] = TypeArgumentsForInstanceAllocation #lib::H [dart:core::String, #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1] [2] = ArgDesc num-args 1, num-type-args 0, names [] [3] = StaticICData target '#lib::H::'' (constructor)', arg-desc CP#2 } ] static factory test_factory() → self::G return new self::H::•(); } class H extends self::G { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::G::'' (constructor)', arg-desc CP#0 } ] synthetic constructor •() → self::H : super self::G::•() ; } class I extends core::Object { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-6] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target 'dart:core::Object::'' (constructor)', arg-desc CP#0 } ] constructor •(dynamic param) → self::I : super core::Object::•() ; [@vm.bytecode= Bytecode { EntryOptional 1, 0, 1 LoadConstant r1, CP#0 LoadConstant r1, CP#1 Frame 1 CheckStack 0 Allocate CP#2 StoreLocal r2 Push r2 Push r1 PushConstant CP#4 IndirectStaticCall 2, CP#3 Drop1 ReturnTOS } ConstantPool { [0] = String 'param' [1] = Null [2] = Class #lib::I [3] = ArgDesc num-args 2, num-type-args 0, names [] [4] = StaticICData target '#lib::I::'' (constructor)', arg-desc CP#3 } ] static factory test_factory2({dynamic param = null}) → self::I return new self::I::•(param); } class J extends core::Object { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] NativeCall CP#0 ReturnTOS } ConstantPool { [0] = NativeEntry agent_J } ] @_in::ExternalName::•("agent_J") external static factory •() → self::J; } abstract class K extends core::Object { [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Push FP[-5] PushConstant CP#0 AllocateT StoreLocal r0 Push r0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 ReturnTOS } ConstantPool { [0] = Class #lib::TestTypeArgReuse [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target '#lib::TestTypeArgReuse::'' (constructor)', arg-desc CP#1 } ] static factory •() → self::K return new self::TestTypeArgReuse::•(); } class TestTypeArgReuse

extends self::Base implements self::K { [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 Push FP[-5] PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::Base::'' (constructor)', arg-desc CP#0 } ] synthetic constructor •() → self::TestTypeArgReuse : super self::Base::•() ; } [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 Allocate CP#0 StoreLocal r0 Push r0 PushConstant CP#1 PushConstant CP#3 IndirectStaticCall 2, CP#2 Drop1 ReturnTOS } ConstantPool { [0] = Class #lib::C [1] = String 'hello' [2] = ArgDesc num-args 2, num-type-args 0, names [] [3] = StaticICData target '#lib::C::'' (constructor)', arg-desc CP#2 } ]static method foo1() → dynamic return new self::C::•("hello"); [@vm.bytecode= Bytecode { Entry 1 CheckStack 0 PushConstant CP#1 PushConstant CP#0 AllocateT StoreLocal r0 Push r0 PushConstant CP#2 PushConstant CP#4 IndirectStaticCall 2, CP#3 Drop1 Drop1 PushConstant CP#6 PushConstant CP#5 AllocateT StoreLocal r0 Push r0 PushConstant CP#8 IndirectStaticCall 1, CP#7 Drop1 Drop1 PushNull ReturnTOS } ConstantPool { [0] = Class #lib::A [1] = TypeArgumentsForInstanceAllocation #lib::A [] [2] = String 'hi' [3] = ArgDesc num-args 2, num-type-args 0, names [] [4] = StaticICData target '#lib::A::'' (constructor)', arg-desc CP#3 [5] = Class #lib::B [6] = TypeArgumentsForInstanceAllocation #lib::B [dart:core::int] [7] = ArgDesc num-args 1, num-type-args 0, names [] [8] = StaticICData target '#lib::B::'' (constructor)', arg-desc CP#7 } ]static method foo2() → void { new self::A::•("hi"); new self::B::•(); } [@vm.bytecode= Bytecode { Entry 2 CheckStack 0 CheckFunctionTypeArgs 1, r0 PushNull Push r0 InstantiateTypeArgumentsTOS 0, CP#1 PushConstant CP#0 AllocateT StoreLocal r1 Push r1 PushConstant CP#3 IndirectStaticCall 1, CP#2 Drop1 Drop1 PushNull ReturnTOS } ConstantPool { [0] = Class #lib::B [1] = TypeArgumentsForInstanceAllocation #lib::B [dart:core::List < #lib::foo3::TypeParam/0 >] [2] = ArgDesc num-args 1, num-type-args 0, names [] [3] = StaticICData target '#lib::B::'' (constructor)', arg-desc CP#2 } ]static method foo3() → void { new self::B::•>(); } [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 PushConstant CP#0 PushConstant CP#2 IndirectStaticCall 1, CP#1 Drop1 PushNull ReturnTOS } ConstantPool { [0] = TypeArgumentsForInstanceAllocation #lib::G [dart:core::int, dart:core::List < dart:core::String >] [1] = ArgDesc num-args 1, num-type-args 0, names [] [2] = StaticICData target '#lib::G::test_factory (constructor)', arg-desc CP#1 } ]static method foo4() → void { self::G::test_factory>(); } [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 PushNull PushConstant CP#1 IndirectStaticCall 1, CP#0 Drop1 PushNull PushInt 42 PushConstant CP#3 IndirectStaticCall 2, CP#2 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 1, num-type-args 0, names [] [1] = StaticICData target '#lib::I::test_factory2 (constructor)', arg-desc CP#0 [2] = ArgDesc num-args 2, num-type-args 0, names [param] [3] = StaticICData target '#lib::I::test_factory2 (constructor)', arg-desc CP#2 } ]static method foo5() → void { self::I::test_factory2(); self::I::test_factory2(param: 42); } [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 PushConstant CP#0 PushInt 0 PushConstant CP#2 IndirectStaticCall 2, CP#1 ReturnTOS } ConstantPool { [0] = TypeArgumentsForInstanceAllocation dart:core::_GrowableList [dart:core::String] [1] = ArgDesc num-args 2, num-type-args 0, names [] [2] = StaticICData target 'dart:core::_GrowableList::'' (constructor)', arg-desc CP#1 } ]static method foo6() → dynamic return core::_GrowableList::•(0); [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 PushConstant CP#0 Push FP[-5] PushConstant CP#2 IndirectStaticCall 2, CP#1 ReturnTOS } ConstantPool { [0] = TypeArgumentsForInstanceAllocation dart:core::_List [dart:core::int] [1] = ArgDesc num-args 2, num-type-args 0, names [] [2] = StaticICData target 'dart:core::_List::'' (constructor)', arg-desc CP#1 } ]static method foo7(core::int n) → dynamic return core::_List::•(n); [@vm.bytecode= Bytecode { Entry 0 CheckStack 0 PushConstant CP#1 IndirectStaticCall 0, CP#0 Drop1 PushConstant CP#2 IndirectStaticCall 0, CP#0 Drop1 PushConstant CP#3 PushConstant CP#5 IndirectStaticCall 1, CP#4 Drop1 PushNull ReturnTOS } ConstantPool { [0] = ArgDesc num-args 0, num-type-args 0, names [] [1] = StaticICData target '#lib::foo1', arg-desc CP#0 [2] = StaticICData target '#lib::foo2', arg-desc CP#0 [3] = TypeArgs [dart:core::String] [4] = ArgDesc num-args 0, num-type-args 1, names [] [5] = StaticICData target '#lib::foo3', arg-desc CP#4 } ]static method main() → dynamic { self::foo1(); self::foo2(); self::foo3(); }