blob: d0e8cf4146bf48aea2f88e57dbb593abaeee8865 [file] [log] [blame]
library #lib;
import self as self;
import "dart:core" as core;
class Base1 extends core::Object {
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
[2] = Null
}
] synthetic constructor •() void
: super core::Object::•()
;
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
CheckFunctionTypeArgs 1, 0
Push FP[-6]
PushConstant CP#0
Push r0
PushConstant CP#1
PushConstant CP#2
AssertAssignable 0, CP#3
Drop1
Push FP[-5]
PushConstant CP#0
PushConstant CP#0
PushConstant CP#4
PushConstant CP#5
AssertAssignable 1, CP#6
Drop1
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
[1] = Type #lib::Base1::foo::T
[2] = String 'a1'
[3] = SubtypeTestCache
[4] = Type dart.core::int
[5] = String 'a2'
[6] = SubtypeTestCache
}
] method foo<T extends core::Object = dynamic>(self::Base1::foo::T a1, core::int a2) void {}
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
PushConstant CP#0
ReturnTOS
PushConstant CP#1
ReturnTOS
}
ConstantPool {
[0] = Int 42
[1] = Null
}
] get bar() dynamic
return 42;
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
AssertAssignable 1, CP#3
Drop1
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
[1] = Type dart.core::int
[2] = String 'x'
[3] = SubtypeTestCache
}
] set bazz(core::int x) void {}
}
class A extends self::Base1 {
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base1::', arg-desc CP#0
[2] = Null
}
] synthetic constructor •() void
: super self::Base1::•()
;
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
AssertAssignable 1, CP#3
Drop1
PushConstant CP#4
Push FP[-6]
PushConstant CP#5
PushConstant CP#6
PushConstant CP#8
IndirectStaticCall 4, CP#7
ReturnTOS
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
[1] = Type dart.core::int
[2] = String 'x'
[3] = SubtypeTestCache
[4] = TypeArgs [dart.core::String]
[5] = String 'a1'
[6] = Int 2
[7] = ArgDesc num-args 3, num-type-args 1, names []
[8] = StaticICData target '#lib::Base1::foo', arg-desc CP#7
}
] method testSuperCall(core::int x) dynamic
return super.{self::Base1::foo}<core::String>("a1", 2);
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
ReturnTOS
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData get target '#lib::Base1::foo', arg-desc CP#0
[2] = Null
}
] method testSuperTearOff() dynamic
return super.{self::Base1::foo};
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
ReturnTOS
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData get target '#lib::Base1::bar', arg-desc CP#0
[2] = Null
}
] method testSuperGet() dynamic
return super.{self::Base1::bar};
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
PushConstant CP#0
Push FP[-5]
PushConstant CP#2
IndirectStaticCall 1, CP#1
PushConstant CP#3
InstanceCall 3, CP#5
ReturnTOS
PushConstant CP#6
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::int]
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = StaticICData get target '#lib::Base1::bar', arg-desc CP#1
[3] = String 'param'
[4] = ArgDesc num-args 2, num-type-args 1, names []
[5] = ICData target-name 'call', arg-desc CP#4
[6] = Null
}
] method testSuperCallViaGetter() dynamic
return super.{self::Base1::bar}.call<core::int>("param");
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#2
IndirectStaticCall 2, CP#1
Drop1
PushConstant CP#3
ReturnTOS
}
ConstantPool {
[0] = Int 3
[1] = ArgDesc num-args 2, num-type-args 0, names []
[2] = StaticICData set target '#lib::Base1::bazz', arg-desc CP#1
[3] = Null
}
] method testSuperSet() dynamic {
super.{self::Base1::bazz} = 3;
}
}
abstract class Base2 extends core::Object {
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target 'dart.core::Object::', arg-desc CP#0
[2] = Null
}
] synthetic constructor •() void
: super core::Object::•()
;
abstract method foo<T extends core::Object = dynamic>(core::String a1, self::Base2::foo::T a2, core::int a3) void;
abstract get bar() dynamic;
abstract set bazz(core::int x) void;
}
abstract class B extends self::Base2 {
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
Push FP[-5]
PushConstant CP#1
IndirectStaticCall 1, CP#0
Drop1
PushConstant CP#2
ReturnTOS
}
ConstantPool {
[0] = ArgDesc num-args 1, num-type-args 0, names []
[1] = StaticICData target '#lib::Base2::', arg-desc CP#0
[2] = Null
}
] synthetic constructor •() void
: super self::Base2::•()
;
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
AssertAssignable 1, CP#3
Drop1
Push FP[-6]
PushConstant CP#4
PushConstant CP#5
PushConstant CP#6
PushConstant CP#7
CreateArrayTOS
StoreLocal r0
Push r0
PushConstant CP#8
PushConstant CP#9
StoreIndexedTOS
Push r0
PushConstant CP#10
Push FP[-6]
StoreIndexedTOS
Push r0
PushConstant CP#11
PushConstant CP#12
StoreIndexedTOS
Push r0
PushConstant CP#13
PushConstant CP#14
StoreIndexedTOS
Push r0
PushConstant CP#15
PushConstant CP#7
StoreIndexedTOS
PushConstant CP#16
PushConstant CP#18
IndirectStaticCall 4, CP#17
PushConstant CP#20
IndirectStaticCall 2, CP#19
ReturnTOS
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
[1] = Type dart.core::int
[2] = String 'x'
[3] = SubtypeTestCache
[4] = String 'foo'
[5] = ArgDesc num-args 4, num-type-args 1, names []
[6] = TypeArgs [dynamic]
[7] = Int 5
[8] = Int 0
[9] = TypeArgs [dart.core::double]
[10] = Int 1
[11] = Int 2
[12] = String 'a1'
[13] = Int 3
[14] = Double 3.14
[15] = Int 4
[16] = Bool true
[17] = ArgDesc num-args 4, num-type-args 0, names []
[18] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#17
[19] = ArgDesc num-args 2, num-type-args 0, names []
[20] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#19
}
] method testSuperCall(core::int x) dynamic
return super.{self::Base2::foo}<core::double>("a1", 3.14, 5);
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
CreateArrayTOS
StoreLocal r0
Push r0
PushConstant CP#4
Push FP[-5]
StoreIndexedTOS
PushConstant CP#5
PushConstant CP#7
IndirectStaticCall 4, CP#6
PushConstant CP#9
IndirectStaticCall 2, CP#8
ReturnTOS
PushConstant CP#10
ReturnTOS
}
ConstantPool {
[0] = String 'foo'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = TypeArgs [dynamic]
[3] = Int 1
[4] = Int 0
[5] = Bool true
[6] = ArgDesc num-args 4, num-type-args 0, names []
[7] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#6
[8] = ArgDesc num-args 2, num-type-args 0, names []
[9] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#8
[10] = Null
}
] method testSuperTearOff() dynamic
return super.{self::Base2::foo};
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
CreateArrayTOS
StoreLocal r0
Push r0
PushConstant CP#4
Push FP[-5]
StoreIndexedTOS
PushConstant CP#5
PushConstant CP#7
IndirectStaticCall 4, CP#6
PushConstant CP#9
IndirectStaticCall 2, CP#8
ReturnTOS
PushConstant CP#10
ReturnTOS
}
ConstantPool {
[0] = String 'bar'
[1] = ArgDesc num-args 1, num-type-args 0, names []
[2] = TypeArgs [dynamic]
[3] = Int 1
[4] = Int 0
[5] = Bool true
[6] = ArgDesc num-args 4, num-type-args 0, names []
[7] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#6
[8] = ArgDesc num-args 2, num-type-args 0, names []
[9] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#8
[10] = Null
}
] method testSuperGet() dynamic
return super.{self::Base2::bar};
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
PushConstant CP#0
Push FP[-5]
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
PushConstant CP#4
CreateArrayTOS
StoreLocal r0
Push r0
PushConstant CP#5
Push FP[-5]
StoreIndexedTOS
PushConstant CP#6
PushConstant CP#8
IndirectStaticCall 4, CP#7
PushConstant CP#10
IndirectStaticCall 2, CP#9
PushConstant CP#11
InstanceCall 3, CP#13
ReturnTOS
PushConstant CP#14
ReturnTOS
}
ConstantPool {
[0] = TypeArgs [dart.core::int]
[1] = String 'bar'
[2] = ArgDesc num-args 1, num-type-args 0, names []
[3] = TypeArgs [dynamic]
[4] = Int 1
[5] = Int 0
[6] = Bool true
[7] = ArgDesc num-args 4, num-type-args 0, names []
[8] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#7
[9] = ArgDesc num-args 2, num-type-args 0, names []
[10] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#9
[11] = String 'param'
[12] = ArgDesc num-args 2, num-type-args 1, names []
[13] = ICData target-name 'call', arg-desc CP#12
[14] = Null
}
] method testSuperCallViaGetter() dynamic
return super.{self::Base2::bar}.call<core::int>("param");
[@vm.bytecode=
Bytecode {
Entry 1
CheckStack
Push FP[-5]
PushConstant CP#0
PushConstant CP#1
PushConstant CP#2
PushConstant CP#3
CreateArrayTOS
StoreLocal r0
Push r0
PushConstant CP#4
Push FP[-5]
StoreIndexedTOS
Push r0
PushConstant CP#5
PushConstant CP#6
StoreIndexedTOS
PushConstant CP#7
PushConstant CP#9
IndirectStaticCall 4, CP#8
PushConstant CP#10
IndirectStaticCall 2, CP#1
Drop1
PushConstant CP#11
ReturnTOS
}
ConstantPool {
[0] = String 'bazz'
[1] = ArgDesc num-args 2, num-type-args 0, names []
[2] = TypeArgs [dynamic]
[3] = Int 2
[4] = Int 0
[5] = Int 1
[6] = Int 3
[7] = Bool true
[8] = ArgDesc num-args 4, num-type-args 0, names []
[9] = StaticICData target 'dart.core::_InvocationMirror::_allocateInvocationMirror', arg-desc CP#8
[10] = StaticICData target 'dart.core::Object::noSuchMethod', arg-desc CP#1
[11] = Null
}
] method testSuperSet() dynamic {
super.{self::Base2::bazz} = 3;
}
}
[@vm.bytecode=
Bytecode {
Entry 0
CheckStack
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Null
}
]static method main() dynamic {}