blob: 6b29eac871e9ce347c0642d4e526a706b8ad96a7 [file] [log] [blame]
main = #lib::main;
[@vm.bytecode=
ComponentBytecodeMetadata {
Bytecode (version: stable)
Main library: #lib
}
] [@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'globalVar', type = dart:core::List < dart:core::Iterable null >, reflectable, static
value = null
Function 'foo1', static, reflectable, debuggable
parameters [dynamic 'x'] (required: 1)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
PushConstant CP#0
InterfaceCall 2, CP#1
JumpIfFalse L1
PushConstant CP#3
DirectCall 1, CP#4
Drop1
L1:
Push FP[-5]
PushNull
PushNull
PushConstant CP#6
InterfaceCall 4, CP#7
JumpIfFalse L2
PushConstant CP#9
DirectCall 1, CP#4
Drop1
L2:
Push FP[-5]
PushConstant CP#10
PushNull
PushNull
PushConstant CP#11
AssertAssignable 0, CP#12
ReturnTOS
}
ConstantPool {
[0] = Type #lib::B
[1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
[2] = Reserved
[3] = ObjectRef '11'
[4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[5] = Reserved
[6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
[7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
[8] = Reserved
[9] = ObjectRef '12'
[10] = Type #lib::A < dart:core::int >
[11] = ObjectRef ' in type cast'
[12] = SubtypeTestCache
}
Function 'foo5', static, reflectable, debuggable
parameters [dynamic 'x'] (required: 1)
return-type void
Bytecode {
Entry 1
CheckStack 0
Push FP[-5]
PushConstant CP#0
PushNull
PushNull
PushConstant CP#1
AssertAssignable 0, CP#2
StoreStaticTOS CP#3
PushNull
ReturnTOS
}
ConstantPool {
[0] = Type dart:core::List < dart:core::Iterable null >
[1] = ObjectRef ''
[2] = SubtypeTestCache
[3] = StaticField #lib::globalVar (field)
}
Function 'main', static, reflectable, debuggable
parameters [] (required: 0)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
PushNull
ReturnTOS
}
ConstantPool {
}
}
}
]library #lib from "#lib" as #lib {
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', constructor, reflectable
parameters [] (required: 0)
return-type #lib::A < #lib::A::TypeParam/0 >
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
DirectCall 1, CP#0
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
}
}
}
] class A<T extends dart.core::Object = dynamic> extends dart.core::Object {
synthetic constructor •() #lib::A<#lib::A::T>
: super dart.core::Object::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', constructor, reflectable
parameters [] (required: 0)
return-type #lib::B
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
DirectCall 1, CP#0
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
}
}
}
] class B extends #lib::A<dart.core::String> {
synthetic constructor •() #lib::B
: super #lib::A::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', constructor, reflectable
parameters [] (required: 0)
return-type #lib::C < dart:core::String, #lib::C::TypeParam/0, #lib::C::TypeParam/1, #lib::C::TypeParam/2 >
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
DirectCall 1, CP#0
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
}
}
}
] class C<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic> extends #lib::B {
synthetic constructor •() #lib::C<#lib::C::T1, #lib::C::T2, #lib::C::T3>
: super #lib::B::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'foo', type = dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >, getter = 'get:foo', setter = 'set:foo', reflectable
value = null
Function '', constructor, reflectable, debuggable
parameters [dynamic 'tt'] (required: 1)
return-type #lib::D < dart:core::String, dart:core::int, #lib::D::TypeParam/1, #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
Bytecode {
Entry 0
CheckStack 0
Push FP[-6]
Push FP[-5]
PushConstant CP#0
Push FP[-6]
LoadTypeArgumentsField CP#1
PushNull
PushConstant CP#2
AssertAssignable 0, CP#3
StoreFieldTOS CP#4
Push FP[-6]
DirectCall 1, CP#6
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
[1] = TypeArgumentsField #lib::D
[2] = ObjectRef ''
[3] = SubtypeTestCache
[4] = InstanceField #lib::D::foo (field)
[5] = Reserved
[6] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[7] = Reserved
}
Function 'foo2', reflectable, debuggable
parameters [dynamic 'y'] (required: 1)
return-type dynamic
Bytecode {
Entry 1
CheckStack 0
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
PushConstant CP#1
InterfaceCall 4, CP#2
JumpIfFalse L1
PushConstant CP#4
DirectCall 1, CP#5
Drop1
L1:
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
PushConstant CP#7
InterfaceCall 4, CP#2
JumpIfFalse L2
PushConstant CP#8
DirectCall 1, CP#5
Drop1
L2:
Push FP[-6]
Push FP[-5]
PushConstant CP#9
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
PushConstant CP#10
AssertAssignable 0, CP#11
InterfaceCall 2, CP#12
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::D
[1] = Type #lib::A < #lib::D::TypeParam/0 >
[2] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
[3] = Reserved
[4] = ObjectRef '21'
[5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[6] = Reserved
[7] = Type #lib::C < dart:core::String, dynamic, #lib::D::TypeParam/1, dart:core::List < #lib::D::TypeParam/0 > >
[8] = ObjectRef '22'
[9] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
[10] = ObjectRef ''
[11] = SubtypeTestCache
[12] = InterfaceCall '#lib::D::set:foo', ArgDesc num-args 2, num-type-args 0, names []
[13] = Reserved
}
Function 'foo3', reflectable, debuggable
type-params <dart:core::Object T1, dart:core::Object T2>
parameters [dynamic 'z'] (required: 1)
return-type dynamic
Bytecode {
Entry 1
CheckStack 0
CheckFunctionTypeArgs 2, r0
Push FP[-5]
PushNull
Push r0
PushConstant CP#0
InterfaceCall 4, CP#1
JumpIfFalse L1
PushConstant CP#3
DirectCall 1, CP#4
Drop1
L1:
Push FP[-5]
Push FP[-6]
LoadTypeArgumentsField CP#6
Push r0
PushConstant CP#7
InterfaceCall 4, CP#1
JumpIfFalse L2
PushConstant CP#8
DirectCall 1, CP#4
Drop1
L2:
Push FP[-5]
PushConstant CP#9
Push FP[-6]
LoadTypeArgumentsField CP#6
Push r0
PushConstant CP#10
AssertAssignable 0, CP#11
InterfaceCall 1, CP#12
ReturnTOS
}
ConstantPool {
[0] = Type #lib::A < #lib::D::foo3::TypeParam/0 >
[1] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
[2] = Reserved
[3] = ObjectRef '31'
[4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[5] = Reserved
[6] = TypeArgumentsField #lib::D
[7] = Type #lib::C < dart:core::String, dart:core::Map < #lib::D::foo3::TypeParam/0, #lib::D::TypeParam/0 >, dart:core::List < #lib::D::foo3::TypeParam/1 >, #lib::D::TypeParam/1 >
[8] = ObjectRef '32'
[9] = Type dart:core::Map < #lib::D::foo3::TypeParam/1, #lib::D::TypeParam/1 >
[10] = ObjectRef ' in type cast'
[11] = SubtypeTestCache
[12] = InterfaceCall 'dart:core::Map::get:values', ArgDesc num-args 1, num-type-args 0, names []
[13] = Reserved
}
Function 'foo4', reflectable, debuggable
parameters [dynamic 'w'] (required: 1)
return-type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
Bytecode {
Entry 2
CheckStack 0
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
InstantiateTypeArgumentsTOS 0, CP#1
StoreLocal r1
Push r1
PushInt 1
CreateArrayTOS
StoreLocal r1
Push r1
PushInt 0
Push FP[-5]
PushConstant CP#2
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
PushConstant CP#3
AssertAssignable 0, CP#4
StoreIndexedTOS
DirectCall 2, CP#5
PopLocal r0
Push FP[-5]
PushConstant CP#2
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
PushConstant CP#3
AssertAssignable 0, CP#7
ReturnTOS
}
ConstantPool {
[0] = TypeArgumentsField #lib::D
[1] = ObjectRef < dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 > >
[2] = Type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
[3] = ObjectRef ''
[4] = SubtypeTestCache
[5] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
[6] = Reserved
[7] = SubtypeTestCache
}
}
}
] class D<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::C<dart.core::int, #lib::D::Q, #lib::D::P> {
generic-covariant-impl field dart.core::Map<#lib::D::P, #lib::D::Q> foo;
constructor •(dynamic tt) #lib::D<#lib::D::P, #lib::D::Q>
: #lib::D::foo = tt as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>, super #lib::C::•()
;
method foo2(dynamic y) dynamic {
if(y is #lib::A<#lib::D::P>) {
dart.core::print("21");
}
if(y is #lib::C<dynamic, #lib::D::Q, dart.core::List<#lib::D::P>>) {
dart.core::print("22");
}
[@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{#lib::D::foo} = y as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
}
method foo3<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic>(dynamic z) dynamic {
if(z is #lib::A<#lib::D::foo3::T1>) {
dart.core::print("31");
}
if(z is #lib::C<dart.core::Map<#lib::D::foo3::T1, #lib::D::P>, dart.core::List<#lib::D::foo3::T2>, #lib::D::Q>) {
dart.core::print("32");
}
return (z as dart.core::Map<#lib::D::foo3::T2, #lib::D::Q>).{dart.core::Map::values};
}
method foo4(dynamic w) dart.core::Map<#lib::D::P, #lib::D::Q> {
dart.core::List<dart.core::Map<#lib::D::P, #lib::D::Q>> list = <dart.core::Map<#lib::D::P, #lib::D::Q>>[w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>];
return w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
}
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', factory, static, reflectable, debuggable
type-params <dart:core::String P>
parameters [] (required: 0)
return-type #lib::E < #lib::E:: (constructor)::TypeParam/0 >
Bytecode {
Entry 0
CheckStack 0
PushNull
ReturnTOS
}
ConstantPool {
}
Function 'foo6', reflectable, debuggable
type-params <#lib::E::TypeParam/0 T, dart:core::List < #lib::E::foo6::TypeParam/0 > U>
parameters [dart:core::Map < #lib::E::foo6::TypeParam/0, #lib::E::foo6::TypeParam/1 > 'map'] (required: 1)
return-type void
Bytecode {
Entry 1
CheckStack 0
CheckFunctionTypeArgs 2, r0
JumpIfNotZeroTypeArgs L1
Push FP[-6]
LoadTypeArgumentsField CP#0
PushNull
InstantiateTypeArgumentsTOS 0, CP#1
PopLocal r0
L1:
Push FP[-6]
LoadTypeArgumentsField CP#0
Push r0
PushConstant CP#2
PushConstant CP#3
PushConstant CP#4
AssertSubtype
PushNull
ReturnTOS
}
Default function type arguments: CP#1
ConstantPool {
[0] = TypeArgumentsField #lib::E
[1] = ObjectRef < #lib::E::TypeParam/0, dart:core::List < #lib::E::TypeParam/0 > >
[2] = Type #lib::E::foo6::TypeParam/0
[3] = Type #lib::E::TypeParam/0
[4] = ObjectRef 'T'
}
}
}
] class E<P extends dart.core::String = dart.core::String> extends dart.core::Object {
static factory •<P extends dart.core::String = dynamic>() #lib::E<#lib::E::•::P>
return null;
method foo6<generic-covariant-impl T extends #lib::E::P = #lib::E::P, U extends dart.core::List<#lib::E::foo6::T> = dart.core::List<#lib::E::P>>(dart.core::Map<#lib::E::foo6::T, #lib::E::foo6::U> map) → void {}
}
static field dart.core::List<dart.core::Iterable<dynamic>> globalVar;
static method foo1(dynamic x) dynamic {
if(x is #lib::B) {
dart.core::print("11");
}
if(x is #lib::C<dart.core::int, dart.core::Object, dynamic>) {
dart.core::print("12");
}
return x as #lib::A<dart.core::int>;
}
static method foo5(dynamic x) void {
#lib::globalVar = x as{TypeError} dart.core::List<dart.core::Iterable<dynamic>>;
}
static method main() dynamic {}
}