68de477535
Corresponding VM changes: https://dart-review.googlesource.com/c/sdk/+/101062 On a large app, size of bytecode instructions: Before: 12115384 After: 6282376 (-48.1%) Total size of the app: Before: 29790240 After: 23681504 (-20.5%) Change-Id: Idd8f97e991236c25d663d1bcf18a51a53e73a2b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99400 Reviewed-by: Ryan Macnak <rmacnak@google.com>
1835 lines
48 KiB
Plaintext
1835 lines
48 KiB
Plaintext
main = #lib::main;
|
|
[@vm.bytecode=
|
|
ComponentBytecodeMetadata {
|
|
|
|
Bytecode (version: stable)
|
|
Main library: #lib
|
|
|
|
}
|
|
] [@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function 'simpleClosure', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dart:core::int
|
|
|
|
|
|
Bytecode {
|
|
Entry 4
|
|
CheckStack 0
|
|
AllocateContext 0, 1
|
|
PopLocal r0
|
|
Push r0
|
|
PushInt 5
|
|
StoreContextVar 0, 0
|
|
AllocateClosure CP#0
|
|
StoreLocal r3
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#7
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#9
|
|
Push r3
|
|
PushConstant CP#11
|
|
StoreFieldTOS CP#12
|
|
Push r3
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#14
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r2
|
|
Push r2
|
|
PushInt 3
|
|
DynamicCall CP#17, 2
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction 0
|
|
[1] = InstanceField dart:core::_Closure::_context (field)
|
|
[2] = Reserved
|
|
[3] = Type dart:core::int
|
|
[4] = ObjectRef 'y'
|
|
[5] = SubtypeTestCache
|
|
[6] = EndClosureFunctionScope
|
|
[7] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[8] = Reserved
|
|
[9] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[10] = Reserved
|
|
[11] = EmptyTypeArguments
|
|
[12] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[13] = Reserved
|
|
[14] = InstanceField dart:core::_Closure::_function (field)
|
|
[15] = Reserved
|
|
[16] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
|
|
[17] = ICData dynamic target-name 'call', arg-desc CP#16
|
|
}
|
|
Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 2, 3
|
|
CheckStack 0
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
Push FP[-5]
|
|
PushConstant CP#3
|
|
PushNull
|
|
PushNull
|
|
PushConstant CP#4
|
|
AssertAssignable 1, CP#5
|
|
Drop1
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
Push FP[-5]
|
|
AddInt
|
|
StoreContextVar 0, 0
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
|
|
Function 'callWithArgs', static, reflectable, debuggable
|
|
type-params <dart:core::Object T1, dart:core::Object T2, dart:core::Object T3, dart:core::Object T4, dart:core::Object T5, dart:core::Object T6, dart:core::Object T7, dart:core::Object T8>
|
|
parameters [] (required: 0)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 2
|
|
CheckStack 0
|
|
CheckFunctionTypeArgs 8, r0
|
|
PushConstant CP#0
|
|
StoreLocal r1
|
|
Push r1
|
|
PushInt 8
|
|
CreateArrayTOS
|
|
StoreLocal r1
|
|
Push r1
|
|
PushInt 0
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#1
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 1
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#2
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 2
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#3
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 3
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#4
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 4
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#5
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 5
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#6
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 6
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#7
|
|
StoreIndexedTOS
|
|
Push r1
|
|
PushInt 7
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#8
|
|
StoreIndexedTOS
|
|
DirectCall CP#9, 2
|
|
DirectCall CP#11, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ObjectRef < dart:core::Type >
|
|
[1] = Type #lib::callWithArgs::TypeParam/0
|
|
[2] = Type #lib::callWithArgs::TypeParam/1
|
|
[3] = Type #lib::callWithArgs::TypeParam/2
|
|
[4] = Type #lib::callWithArgs::TypeParam/3
|
|
[5] = Type #lib::callWithArgs::TypeParam/4
|
|
[6] = Type #lib::callWithArgs::TypeParam/5
|
|
[7] = Type #lib::callWithArgs::TypeParam/6
|
|
[8] = Type #lib::callWithArgs::TypeParam/7
|
|
[9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
|
|
[10] = Reserved
|
|
[11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
|
|
[12] = Reserved
|
|
}
|
|
|
|
|
|
Function 'callA', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 1
|
|
CheckStack 0
|
|
PushConstant CP#0
|
|
PushConstant CP#2
|
|
PushConstant CP#1
|
|
AllocateT
|
|
StoreLocal r0
|
|
Push r0
|
|
DirectCall CP#3, 1
|
|
Drop1
|
|
InterfaceCall CP#5, 2
|
|
Drop1
|
|
PushConstant CP#7
|
|
PushConstant CP#2
|
|
PushConstant CP#1
|
|
AllocateT
|
|
StoreLocal r0
|
|
Push r0
|
|
DirectCall CP#3, 1
|
|
Drop1
|
|
InterfaceCall CP#5, 2
|
|
Drop1
|
|
PushConstant CP#7
|
|
PushConstant CP#8
|
|
PushConstant CP#1
|
|
AllocateT
|
|
StoreLocal r0
|
|
Push r0
|
|
DirectCall CP#3, 1
|
|
Drop1
|
|
InterfaceCall CP#5, 2
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ObjectRef < #lib::C3, #lib::C4 >
|
|
[1] = Class #lib::A
|
|
[2] = ObjectRef < #lib::C1, #lib::C2 >
|
|
[3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[4] = Reserved
|
|
[5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
|
|
[6] = Reserved
|
|
[7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
|
|
[8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
|
|
}
|
|
|
|
|
|
Function 'testPartialInstantiation', static, reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type FunctionType (dart:core::int) -> dynamic
|
|
|
|
|
|
Bytecode {
|
|
Entry 7
|
|
CheckStack 0
|
|
AllocateClosure CP#0
|
|
StoreLocal r3
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#14
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#6
|
|
Push r3
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#3
|
|
Push r3
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#16
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r2
|
|
Push r2
|
|
StoreLocal r3
|
|
PushConstant CP#18
|
|
StoreLocal r6
|
|
DirectCall CP#19, 2
|
|
Drop1
|
|
Allocate CP#21
|
|
StoreLocal r5
|
|
Push r6
|
|
StoreFieldTOS CP#3
|
|
Push r5
|
|
Push r3
|
|
LoadFieldTOS CP#14
|
|
StoreFieldTOS CP#14
|
|
Push r5
|
|
Push r3
|
|
LoadFieldTOS CP#6
|
|
StoreFieldTOS CP#6
|
|
Push r5
|
|
Push r3
|
|
LoadFieldTOS CP#16
|
|
StoreFieldTOS CP#16
|
|
Push r5
|
|
Push r3
|
|
LoadFieldTOS CP#1
|
|
StoreFieldTOS CP#1
|
|
Push r5
|
|
PopLocal r4
|
|
Push r4
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction 0
|
|
[1] = InstanceField dart:core::_Closure::_context (field)
|
|
[2] = Reserved
|
|
[3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[4] = Reserved
|
|
[5] = EmptyTypeArguments
|
|
[6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[7] = Reserved
|
|
[8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
|
|
[9] = Reserved
|
|
[10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
|
|
[11] = ObjectRef 't'
|
|
[12] = SubtypeTestCache
|
|
[13] = EndClosureFunctionScope
|
|
[14] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[15] = Reserved
|
|
[16] = InstanceField dart:core::_Closure::_function (field)
|
|
[17] = Reserved
|
|
[18] = ObjectRef < dart:core::int >
|
|
[19] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
|
|
[20] = Reserved
|
|
[21] = Class dart:core::_Closure
|
|
}
|
|
Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
|
|
ClosureCode {
|
|
EntryFixed 2, 3
|
|
CheckStack 0
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r1
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#3
|
|
StoreLocal r0
|
|
PushConstant CP#5
|
|
JumpIfEqStrict L1
|
|
CheckFunctionTypeArgs 0, r2
|
|
Jump L2
|
|
L1:
|
|
CheckFunctionTypeArgs 1, r0
|
|
L2:
|
|
Push r0
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#6
|
|
PushInt 0
|
|
PushInt 1
|
|
DirectCall CP#8, 4
|
|
PopLocal r0
|
|
Push FP[-5]
|
|
PushConstant CP#10
|
|
PushNull
|
|
Push r0
|
|
PushConstant CP#11
|
|
AssertAssignable 0, CP#12
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
|
|
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 {
|
|
|
|
typedef IntFunc = (dart.core::int) → dynamic;
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C1
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C1 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C1
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C2
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C2 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C2
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C3
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C3 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C3
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C4
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C4 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C4
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C5
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C5 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C5
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C6
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C6 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C6
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C7
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C7 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C7
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C8
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C8 extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C8
|
|
: super dart.core::Object::•()
|
|
;
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::A < #lib::A::TypeParam/0, #lib::A::TypeParam/1 >
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
|
|
Function 'foo', reflectable, debuggable
|
|
type-params <dart:core::Object T3, dart:core::Object T4>
|
|
parameters [] (required: 0)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 5
|
|
CheckStack 0
|
|
CheckFunctionTypeArgs 2, r0
|
|
AllocateContext 0, 1
|
|
PopLocal r1
|
|
Push r1
|
|
Push FP[-5]
|
|
StoreContextVar 0, 0
|
|
AllocateClosure CP#0
|
|
StoreLocal r4
|
|
Push r4
|
|
Push FP[-5]
|
|
LoadTypeArgumentsField CP#14
|
|
StoreFieldTOS CP#30
|
|
Push r4
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
Push r4
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#3
|
|
Push r4
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#32
|
|
Push r4
|
|
Push r1
|
|
StoreFieldTOS CP#1
|
|
PopLocal r3
|
|
PushConstant CP#43
|
|
Push r3
|
|
DynamicCall CP#44, 2
|
|
Drop1
|
|
PushConstant CP#45
|
|
Push r3
|
|
DynamicCall CP#46, 2
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction 0
|
|
[1] = InstanceField dart:core::_Closure::_context (field)
|
|
[2] = Reserved
|
|
[3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[4] = Reserved
|
|
[5] = EmptyTypeArguments
|
|
[6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[7] = Reserved
|
|
[8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
|
|
[9] = Reserved
|
|
[10] = ClosureFunction 1
|
|
[11] = ClosureFunction 2
|
|
[12] = ObjectRef < dart:core::Type >
|
|
[13] = Type #lib::A::TypeParam/0
|
|
[14] = TypeArgumentsField #lib::A
|
|
[15] = Type #lib::A::TypeParam/1
|
|
[16] = Type #lib::A::foo::TypeParam/0
|
|
[17] = Type #lib::A::foo::TypeParam/1
|
|
[18] = Type #lib::A::foo::Closure/0::TypeParam/0
|
|
[19] = Type #lib::A::foo::Closure/0::TypeParam/1
|
|
[20] = Type #lib::A::foo::Closure/1::TypeParam/0
|
|
[21] = Type #lib::A::foo::Closure/1::TypeParam/1
|
|
[22] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
|
|
[23] = Reserved
|
|
[24] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
|
|
[25] = Reserved
|
|
[26] = ObjectRef < #lib::A::TypeParam/0, #lib::A::TypeParam/1, #lib::A::foo::TypeParam/0, #lib::A::foo::TypeParam/1, #lib::A::foo::Closure/0::TypeParam/0, #lib::A::foo::Closure/0::TypeParam/1, #lib::A::foo::Closure/1::TypeParam/0, #lib::A::foo::Closure/1::TypeParam/1 >
|
|
[27] = DirectCall '#lib::callWithArgs', ArgDesc num-args 0, num-type-args 8, names []
|
|
[28] = Reserved
|
|
[29] = EndClosureFunctionScope
|
|
[30] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[31] = Reserved
|
|
[32] = InstanceField dart:core::_Closure::_function (field)
|
|
[33] = Reserved
|
|
[34] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
|
|
[35] = ICData dynamic target-name 'call', arg-desc CP#34
|
|
[36] = EndClosureFunctionScope
|
|
[37] = ObjectRef < #lib::C7, #lib::C8 >
|
|
[38] = ObjectRef ArgDesc num-args 1, num-type-args 2, names []
|
|
[39] = ICData dynamic target-name 'call', arg-desc CP#38
|
|
[40] = ObjectRef < dart:core::List < #lib::C7 >, dart:core::List < #lib::C8 > >
|
|
[41] = ICData dynamic target-name 'call', arg-desc CP#38
|
|
[42] = EndClosureFunctionScope
|
|
[43] = ObjectRef < #lib::C5, #lib::C6 >
|
|
[44] = ICData dynamic target-name 'call', arg-desc CP#38
|
|
[45] = ObjectRef < dart:core::List < #lib::C5 >, dart:core::List < #lib::C6 > >
|
|
[46] = ICData dynamic target-name 'call', arg-desc CP#38
|
|
}
|
|
Closure #lib::A::foo::'nested1' <dart:core::Object T5, dart:core::Object T6> () -> void
|
|
ClosureCode {
|
|
EntryFixed 1, 5
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r1
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#3
|
|
StoreLocal r0
|
|
PushConstant CP#5
|
|
JumpIfEqStrict L1
|
|
CheckFunctionTypeArgs 0, r2
|
|
Jump L2
|
|
L1:
|
|
CheckFunctionTypeArgs 2, r0
|
|
L2:
|
|
Push r0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#6
|
|
PushInt 2
|
|
PushInt 4
|
|
DirectCall CP#8, 4
|
|
PopLocal r0
|
|
AllocateClosure CP#10
|
|
StoreLocal r4
|
|
Push r4
|
|
Push r1
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#14
|
|
StoreFieldTOS CP#30
|
|
Push r4
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
Push r4
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#3
|
|
Push r4
|
|
PushConstant CP#10
|
|
StoreFieldTOS CP#32
|
|
Push r4
|
|
Push r1
|
|
StoreFieldTOS CP#1
|
|
PopLocal r3
|
|
PushConstant CP#37
|
|
Push r3
|
|
DynamicCall CP#39, 2
|
|
Drop1
|
|
PushConstant CP#40
|
|
Push r3
|
|
DynamicCall CP#41, 2
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::A::foo::Closure/0::'nested2' <dart:core::Object T7, dart:core::Object T8> () -> void
|
|
ClosureCode {
|
|
EntryFixed 1, 5
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r1
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#3
|
|
StoreLocal r0
|
|
PushConstant CP#5
|
|
JumpIfEqStrict L1
|
|
CheckFunctionTypeArgs 0, r2
|
|
Jump L2
|
|
L1:
|
|
CheckFunctionTypeArgs 2, r0
|
|
L2:
|
|
Push r0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#6
|
|
PushInt 4
|
|
PushInt 6
|
|
DirectCall CP#8, 4
|
|
PopLocal r0
|
|
AllocateClosure CP#11
|
|
StoreLocal r4
|
|
Push r4
|
|
Push r1
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#14
|
|
StoreFieldTOS CP#30
|
|
Push r4
|
|
Push r0
|
|
StoreFieldTOS CP#6
|
|
Push r4
|
|
PushConstant CP#5
|
|
StoreFieldTOS CP#3
|
|
Push r4
|
|
PushConstant CP#11
|
|
StoreFieldTOS CP#32
|
|
Push r4
|
|
Push r1
|
|
StoreFieldTOS CP#1
|
|
PopLocal r3
|
|
Push r3
|
|
DynamicCall CP#35, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::A::foo::Closure/1::'<anonymous closure>' () -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 1, 4
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r1
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#6
|
|
PopLocal r0
|
|
PushConstant CP#12
|
|
StoreLocal r3
|
|
Push r3
|
|
PushInt 8
|
|
CreateArrayTOS
|
|
StoreLocal r3
|
|
Push r3
|
|
PushInt 0
|
|
Push r1
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#14
|
|
PushNull
|
|
InstantiateType CP#13
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 1
|
|
Push r1
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#14
|
|
PushNull
|
|
InstantiateType CP#15
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 2
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#16
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 3
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#17
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 4
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#18
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 5
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#19
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 6
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#20
|
|
StoreIndexedTOS
|
|
Push r3
|
|
PushInt 7
|
|
PushNull
|
|
Push r0
|
|
InstantiateType CP#21
|
|
StoreIndexedTOS
|
|
DirectCall CP#22, 2
|
|
DirectCall CP#24, 1
|
|
Drop1
|
|
Push r1
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#14
|
|
Push r0
|
|
InstantiateTypeArgumentsTOS 0, CP#26
|
|
DirectCall CP#27, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class A<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic> extends dart.core::Object {
|
|
synthetic constructor •() → #lib::A<#lib::A::T1, #lib::A::T2>
|
|
: super dart.core::Object::•()
|
|
;
|
|
method foo<T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic>() → void {
|
|
function nested1<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void {
|
|
function nested2<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
|
|
() → dart.core::Null nested3 = () → dart.core::Null {
|
|
dart.core::print(<dart.core::Type>[#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]);
|
|
#lib::callWithArgs<#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8>();
|
|
};
|
|
[@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] nested3.call();
|
|
}
|
|
[@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<#lib::C7, #lib::C8>();
|
|
[@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<dart.core::List<#lib::C7>, dart.core::List<#lib::C8>>();
|
|
}
|
|
[@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<#lib::C5, #lib::C6>();
|
|
[@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<dart.core::List<#lib::C5>, dart.core::List<#lib::C6>>();
|
|
}
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
Field 'foo', type = dart:core::int, getter = 'get:foo', setter = 'set:foo', reflectable
|
|
value = null
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::B
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
Nullable fields: [#lib::B::foo (field)]
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
|
|
Function 'topLevel', reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 5
|
|
CheckStack 0
|
|
AllocateContext 0, 4
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0, 0
|
|
Push r0
|
|
PushInt 1
|
|
StoreContextVar 0, 1
|
|
PushInt 2
|
|
PopLocal r2
|
|
Push r0
|
|
PushInt 3
|
|
StoreContextVar 0, 2
|
|
AllocateClosure CP#0
|
|
StoreLocal r4
|
|
Push r4
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r4
|
|
PushNull
|
|
StoreFieldTOS CP#12
|
|
Push r4
|
|
PushConstant CP#14
|
|
StoreFieldTOS CP#15
|
|
Push r4
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#17
|
|
Push r4
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r3
|
|
Push r3
|
|
PushInt 10
|
|
DynamicCall CP#25, 2
|
|
Drop1
|
|
Push r3
|
|
PushInt 11
|
|
DynamicCall CP#26, 2
|
|
Drop1
|
|
Push r2
|
|
DirectCall CP#21, 1
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0, 2
|
|
DirectCall CP#21, 1
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0, 1
|
|
DirectCall CP#21, 1
|
|
Drop1
|
|
Push r0
|
|
PushInt 42
|
|
StoreContextVar 0, 3
|
|
AllocateClosure CP#27
|
|
StoreLocal r3
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#12
|
|
Push r3
|
|
PushConstant CP#14
|
|
StoreFieldTOS CP#15
|
|
Push r3
|
|
PushConstant CP#27
|
|
StoreFieldTOS CP#17
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r2
|
|
Push r2
|
|
DynamicCall CP#31, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction 0
|
|
[1] = InstanceField dart:core::_Closure::_context (field)
|
|
[2] = Reserved
|
|
[3] = Type dart:core::int
|
|
[4] = ObjectRef 'y'
|
|
[5] = SubtypeTestCache
|
|
[6] = ClosureFunction 1
|
|
[7] = InterfaceCall '#lib::B::get:foo', ArgDesc num-args 1, num-type-args 0, names []
|
|
[8] = Reserved
|
|
[9] = EndClosureFunctionScope
|
|
[10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[11] = Reserved
|
|
[12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[13] = Reserved
|
|
[14] = EmptyTypeArguments
|
|
[15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[16] = Reserved
|
|
[17] = InstanceField dart:core::_Closure::_function (field)
|
|
[18] = Reserved
|
|
[19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
|
|
[20] = ICData dynamic target-name 'call', arg-desc CP#19
|
|
[21] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
|
|
[22] = Reserved
|
|
[23] = EndClosureFunctionScope
|
|
[24] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
|
|
[25] = ICData dynamic target-name 'call', arg-desc CP#24
|
|
[26] = ICData dynamic target-name 'call', arg-desc CP#24
|
|
[27] = ClosureFunction 2
|
|
[28] = InterfaceCall '#lib::B::set:foo', ArgDesc num-args 2, num-type-args 0, names []
|
|
[29] = Reserved
|
|
[30] = EndClosureFunctionScope
|
|
[31] = ICData dynamic target-name 'call', arg-desc CP#19
|
|
}
|
|
Closure #lib::B::topLevel::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 2, 4
|
|
CheckStack 0
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
AllocateContext 1, 2
|
|
StoreLocal r1
|
|
Push r1
|
|
Push r0
|
|
StoreContextParent
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 1, 0
|
|
Push FP[-5]
|
|
PushConstant CP#3
|
|
PushNull
|
|
PushNull
|
|
PushConstant CP#4
|
|
AssertAssignable 1, CP#5
|
|
Drop1
|
|
Push r0
|
|
LoadContextParent
|
|
Push r0
|
|
LoadContextVar 1, 0
|
|
PushInt 1
|
|
AddInt
|
|
StoreContextVar 0, 1
|
|
Push r0
|
|
LoadContextParent
|
|
LoadContextVar 0, 1
|
|
PushInt 5
|
|
CompareIntGt
|
|
JumpIfFalse L1
|
|
Push r0
|
|
PushInt 4
|
|
StoreContextVar 1, 1
|
|
AllocateClosure CP#6
|
|
StoreLocal r2
|
|
Push r2
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r2
|
|
PushNull
|
|
StoreFieldTOS CP#12
|
|
Push r2
|
|
PushConstant CP#14
|
|
StoreFieldTOS CP#15
|
|
Push r2
|
|
PushConstant CP#6
|
|
StoreFieldTOS CP#17
|
|
Push r2
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r3
|
|
Push r3
|
|
DynamicCall CP#20, 1
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 1, 1
|
|
DirectCall CP#21, 1
|
|
Drop1
|
|
L1:
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::B::topLevel::Closure/0::'closure2' () -> void
|
|
ClosureCode {
|
|
EntryFixed 1, 3
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
Push r0
|
|
LoadContextParent
|
|
Push r0
|
|
LoadContextParent
|
|
LoadContextVar 0, 1
|
|
PushInt 2
|
|
AddInt
|
|
StoreContextVar 0, 2
|
|
Push r0
|
|
Push r0
|
|
LoadContextParent
|
|
LoadContextVar 0, 0
|
|
InterfaceCall CP#7, 1
|
|
Push r0
|
|
LoadContextVar 1, 0
|
|
AddInt
|
|
StoreContextVar 1, 1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::B::topLevel::'<anonymous closure>' () -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 1, 3
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
Push r0
|
|
LoadContextVar 0, 3
|
|
InterfaceCall CP#28, 2
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class B extends dart.core::Object {
|
|
field dart.core::int foo = null;
|
|
synthetic constructor •() → #lib::B
|
|
: super dart.core::Object::•()
|
|
;
|
|
method topLevel() → void {
|
|
{
|
|
dart.core::int x = 1;
|
|
{
|
|
dart.core::int y = 2;
|
|
dart.core::int z = 3;
|
|
(dart.core::int) → dart.core::Null closure1 = (dart.core::int y) → dart.core::Null {
|
|
x = y.{dart.core::num::+}(1);
|
|
if(x.{dart.core::num::>}(5)) {
|
|
dart.core::int w = 4;
|
|
function closure2() → void {
|
|
z = x.{dart.core::num::+}(2);
|
|
w = this.{#lib::B::foo}.{dart.core::num::+}(y);
|
|
}
|
|
[@vm.call-site-attributes.metadata=receiverType:() → void] closure2.call();
|
|
dart.core::print(w);
|
|
}
|
|
};
|
|
[@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(10);
|
|
[@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(11);
|
|
dart.core::print(y);
|
|
dart.core::print(z);
|
|
}
|
|
dart.core::print(x);
|
|
}
|
|
{
|
|
dart.core::int x = 42;
|
|
() → dart.core::Null closure3 = () → dart.core::Null {
|
|
this.{#lib::B::foo} = x;
|
|
};
|
|
[@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] closure3.call();
|
|
}
|
|
}
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::C
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
|
|
Function 'testForLoop', reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 5
|
|
CheckStack 0
|
|
AllocateContext 0, 1
|
|
PopLocal r0
|
|
Push r0
|
|
PushInt 0
|
|
StoreContextVar 0, 0
|
|
PushConstant CP#0
|
|
PushConstant CP#1
|
|
DirectCall CP#2, 2
|
|
PopLocal r2
|
|
PushConstant CP#0
|
|
PushConstant CP#1
|
|
DirectCall CP#2, 2
|
|
PopLocal r4
|
|
AllocateContext 1, 1
|
|
StoreLocal r1
|
|
Push r1
|
|
Push r0
|
|
StoreContextParent
|
|
PopLocal r0
|
|
Push r0
|
|
PushInt 0
|
|
StoreContextVar 1, 0
|
|
L2:
|
|
CheckStack 1
|
|
Push r0
|
|
LoadContextVar 1, 0
|
|
PushInt 10
|
|
CompareIntLt
|
|
JumpIfFalse L1
|
|
Push r2
|
|
AllocateClosure CP#4
|
|
StoreLocal r3
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#8
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r3
|
|
PushConstant CP#12
|
|
StoreFieldTOS CP#13
|
|
Push r3
|
|
PushConstant CP#4
|
|
StoreFieldTOS CP#15
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#5
|
|
InterfaceCall CP#17, 2
|
|
Drop1
|
|
Push r4
|
|
AllocateClosure CP#19
|
|
StoreLocal r3
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#8
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r3
|
|
PushConstant CP#12
|
|
StoreFieldTOS CP#13
|
|
Push r3
|
|
PushConstant CP#19
|
|
StoreFieldTOS CP#15
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#5
|
|
InterfaceCall CP#17, 2
|
|
Drop1
|
|
Push r0
|
|
CloneContext 1, 1
|
|
PopLocal r0
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 1, 0
|
|
PushInt 1
|
|
AddInt
|
|
StoreLocal r3
|
|
StoreContextVar 1, 0
|
|
Push r3
|
|
Drop1
|
|
Jump L2
|
|
L1:
|
|
Push r0
|
|
LoadContextParent
|
|
PopLocal r0
|
|
Push r0
|
|
LoadContextParent
|
|
PopLocal r0
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ObjectRef < dart:core::Function >
|
|
[1] = ObjectRef const <dynamic> []
|
|
[2] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
|
|
[3] = Reserved
|
|
[4] = ClosureFunction 0
|
|
[5] = InstanceField dart:core::_Closure::_context (field)
|
|
[6] = Reserved
|
|
[7] = EndClosureFunctionScope
|
|
[8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[9] = Reserved
|
|
[10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[11] = Reserved
|
|
[12] = EmptyTypeArguments
|
|
[13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[14] = Reserved
|
|
[15] = InstanceField dart:core::_Closure::_function (field)
|
|
[16] = Reserved
|
|
[17] = InterfaceCall 'dart:core::List::add', ArgDesc num-args 2, num-type-args 0, names []
|
|
[18] = Reserved
|
|
[19] = ClosureFunction 1
|
|
[20] = Type dart:core::int
|
|
[21] = ObjectRef 'ii'
|
|
[22] = SubtypeTestCache
|
|
[23] = EndClosureFunctionScope
|
|
}
|
|
Closure #lib::C::testForLoop::'<anonymous closure>' () -> dart:core::int
|
|
ClosureCode {
|
|
EntryFixed 1, 2
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#5
|
|
PopLocal r0
|
|
Push r0
|
|
LoadContextVar 1, 0
|
|
Push r0
|
|
LoadContextParent
|
|
LoadContextVar 0, 0
|
|
AddInt
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::C::testForLoop::'<anonymous closure>' (dart:core::int ii) -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 2, 3
|
|
CheckStack 0
|
|
Push FP[-6]
|
|
LoadFieldTOS CP#5
|
|
PopLocal r0
|
|
Push FP[-5]
|
|
PushConstant CP#20
|
|
PushNull
|
|
PushNull
|
|
PushConstant CP#21
|
|
AssertAssignable 1, CP#22
|
|
Drop1
|
|
Push r0
|
|
Push FP[-5]
|
|
Push r0
|
|
LoadContextParent
|
|
LoadContextVar 0, 0
|
|
AddInt
|
|
StoreContextVar 1, 0
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
|
|
Function 'testForInLoop', reflectable, debuggable
|
|
parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
|
|
return-type void
|
|
|
|
|
|
Bytecode {
|
|
Entry 5
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
InterfaceCall CP#0, 1
|
|
PopLocal r2
|
|
L2:
|
|
CheckStack 1
|
|
Push r2
|
|
InterfaceCall CP#2, 1
|
|
JumpIfFalse L1
|
|
AllocateContext 0, 1
|
|
PopLocal r0
|
|
Push r0
|
|
Push r2
|
|
InterfaceCall CP#4, 1
|
|
StoreContextVar 0, 0
|
|
AllocateClosure CP#6
|
|
StoreLocal r4
|
|
Push r4
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r4
|
|
PushNull
|
|
StoreFieldTOS CP#12
|
|
Push r4
|
|
PushConstant CP#14
|
|
StoreFieldTOS CP#15
|
|
Push r4
|
|
PushConstant CP#6
|
|
StoreFieldTOS CP#17
|
|
Push r4
|
|
Push r0
|
|
StoreFieldTOS CP#7
|
|
PopLocal r3
|
|
Push r3
|
|
DynamicCall CP#20, 1
|
|
Drop1
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
DirectCall CP#21, 1
|
|
Drop1
|
|
Push r0
|
|
LoadContextParent
|
|
PopLocal r0
|
|
Jump L2
|
|
L1:
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = InterfaceCall 'dart:core::Iterable::get:iterator', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
[2] = InterfaceCall 'dart:core::Iterator::moveNext', ArgDesc num-args 1, num-type-args 0, names []
|
|
[3] = Reserved
|
|
[4] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names []
|
|
[5] = Reserved
|
|
[6] = ClosureFunction 0
|
|
[7] = InstanceField dart:core::_Closure::_context (field)
|
|
[8] = Reserved
|
|
[9] = EndClosureFunctionScope
|
|
[10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[11] = Reserved
|
|
[12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[13] = Reserved
|
|
[14] = EmptyTypeArguments
|
|
[15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[16] = Reserved
|
|
[17] = InstanceField dart:core::_Closure::_function (field)
|
|
[18] = Reserved
|
|
[19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
|
|
[20] = ICData dynamic target-name 'call', arg-desc CP#19
|
|
[21] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
|
|
[22] = Reserved
|
|
}
|
|
Closure #lib::C::testForInLoop::'<anonymous closure>' () -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 1, 3
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#7
|
|
PopLocal r0
|
|
Push r0
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
PushInt 1
|
|
AddInt
|
|
StoreContextVar 0, 0
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class C extends dart.core::Object {
|
|
synthetic constructor •() → #lib::C
|
|
: super dart.core::Object::•()
|
|
;
|
|
method testForLoop() → void {
|
|
dart.core::int delta = 0;
|
|
dart.core::List<dart.core::Function> getI = <dart.core::Function>[];
|
|
dart.core::List<dart.core::Function> setI = <dart.core::Function>[];
|
|
for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
|
|
[@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] getI.{dart.core::List::add}(() → dart.core::int => i.{dart.core::num::+}(delta));
|
|
[@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] setI.{dart.core::List::add}((dart.core::int ii) → dart.core::Null {
|
|
i = ii.{dart.core::num::+}(delta);
|
|
});
|
|
}
|
|
}
|
|
method testForInLoop(dart.core::List<dart.core::int> list) → void {
|
|
for (dart.core::int i in list) {
|
|
() → dart.core::Null inc = () → dart.core::Null {
|
|
i = i.{dart.core::num::+}(1);
|
|
};
|
|
[@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inc.call();
|
|
dart.core::print(i);
|
|
}
|
|
}
|
|
}
|
|
[@vm.bytecode=
|
|
MembersBytecodeMetadata {
|
|
|
|
Members {
|
|
|
|
Function '', constructor, reflectable
|
|
parameters [] (required: 0)
|
|
return-type #lib::D < #lib::D::TypeParam/0 >
|
|
|
|
|
|
Bytecode {
|
|
Entry 0
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
DirectCall CP#0, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
|
|
[1] = Reserved
|
|
}
|
|
|
|
|
|
Function 'foo', reflectable, debuggable
|
|
parameters [#lib::D::TypeParam/0 't'] (required: 1)
|
|
return-type dynamic
|
|
|
|
|
|
Bytecode {
|
|
Entry 3
|
|
CheckStack 0
|
|
AllocateContext 0, 1
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0, 0
|
|
Push FP[-5]
|
|
PushConstant CP#0
|
|
Push FP[-6]
|
|
LoadTypeArgumentsField CP#1
|
|
PushNull
|
|
PushConstant CP#2
|
|
AssertAssignable 0, CP#3
|
|
Drop1
|
|
AllocateClosure CP#4
|
|
StoreLocal r2
|
|
Push r2
|
|
Push FP[-6]
|
|
LoadTypeArgumentsField CP#1
|
|
StoreFieldTOS CP#8
|
|
Push r2
|
|
PushNull
|
|
StoreFieldTOS CP#10
|
|
Push r2
|
|
PushConstant CP#12
|
|
StoreFieldTOS CP#13
|
|
Push r2
|
|
PushConstant CP#4
|
|
StoreFieldTOS CP#15
|
|
Push r2
|
|
Push r0
|
|
StoreFieldTOS CP#5
|
|
ReturnTOS
|
|
}
|
|
Parameter flags: [2]
|
|
ConstantPool {
|
|
[0] = Type #lib::D::TypeParam/0
|
|
[1] = TypeArgumentsField #lib::D
|
|
[2] = ObjectRef 't'
|
|
[3] = SubtypeTestCache
|
|
[4] = ClosureFunction 0
|
|
[5] = InstanceField dart:core::_Closure::_context (field)
|
|
[6] = Reserved
|
|
[7] = EndClosureFunctionScope
|
|
[8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[9] = Reserved
|
|
[10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[11] = Reserved
|
|
[12] = EmptyTypeArguments
|
|
[13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[14] = Reserved
|
|
[15] = InstanceField dart:core::_Closure::_function (field)
|
|
[16] = Reserved
|
|
}
|
|
Closure #lib::D::foo::'<anonymous closure>' () -> #lib::D::TypeParam/0
|
|
ClosureCode {
|
|
EntryFixed 1, 2
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#5
|
|
PopLocal r0
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
|
|
Function 'bar', reflectable, debuggable
|
|
parameters [] (required: 0)
|
|
return-type dynamic
|
|
|
|
|
|
Bytecode {
|
|
Entry 3
|
|
CheckStack 0
|
|
AllocateContext 0, 1
|
|
PopLocal r0
|
|
Push r0
|
|
Push FP[-5]
|
|
StoreContextVar 0, 0
|
|
AllocateClosure CP#0
|
|
StoreLocal r2
|
|
Push r2
|
|
Push FP[-5]
|
|
LoadTypeArgumentsField CP#5
|
|
StoreFieldTOS CP#6
|
|
Push r2
|
|
PushNull
|
|
StoreFieldTOS CP#8
|
|
Push r2
|
|
PushConstant CP#10
|
|
StoreFieldTOS CP#11
|
|
Push r2
|
|
PushConstant CP#0
|
|
StoreFieldTOS CP#13
|
|
Push r2
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
ReturnTOS
|
|
}
|
|
ConstantPool {
|
|
[0] = ClosureFunction 0
|
|
[1] = InstanceField dart:core::_Closure::_context (field)
|
|
[2] = Reserved
|
|
[3] = ClosureFunction 1
|
|
[4] = EndClosureFunctionScope
|
|
[5] = TypeArgumentsField #lib::D
|
|
[6] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
|
|
[7] = Reserved
|
|
[8] = InstanceField dart:core::_Closure::_function_type_arguments (field)
|
|
[9] = Reserved
|
|
[10] = EmptyTypeArguments
|
|
[11] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
|
|
[12] = Reserved
|
|
[13] = InstanceField dart:core::_Closure::_function (field)
|
|
[14] = Reserved
|
|
[15] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
|
|
[16] = ICData dynamic target-name 'call', arg-desc CP#15
|
|
[17] = EndClosureFunctionScope
|
|
}
|
|
Closure #lib::D::bar::'<anonymous closure>' () -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 1, 4
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
AllocateClosure CP#3
|
|
StoreLocal r3
|
|
Push r3
|
|
Push r0
|
|
LoadContextVar 0, 0
|
|
LoadTypeArgumentsField CP#5
|
|
StoreFieldTOS CP#6
|
|
Push r3
|
|
PushNull
|
|
StoreFieldTOS CP#8
|
|
Push r3
|
|
PushConstant CP#10
|
|
StoreFieldTOS CP#11
|
|
Push r3
|
|
PushConstant CP#3
|
|
StoreFieldTOS CP#13
|
|
Push r3
|
|
Push r0
|
|
StoreFieldTOS CP#1
|
|
PopLocal r2
|
|
Push r2
|
|
DynamicCall CP#16, 1
|
|
Drop1
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
Closure #lib::D::bar::Closure/0::'inner' () -> dart:core::Null
|
|
ClosureCode {
|
|
EntryFixed 1, 2
|
|
CheckStack 0
|
|
Push FP[-5]
|
|
LoadFieldTOS CP#1
|
|
PopLocal r0
|
|
PushNull
|
|
ReturnTOS
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
] class D<T extends dart.core::Object = dynamic> extends dart.core::Object {
|
|
synthetic constructor •() → #lib::D<#lib::D::T>
|
|
: super dart.core::Object::•()
|
|
;
|
|
method foo(generic-covariant-impl #lib::D::T t) → dynamic {
|
|
return () → #lib::D::T => t;
|
|
}
|
|
method bar() → dynamic {
|
|
return () → dart.core::Null {
|
|
function inner() → dart.core::Null {}
|
|
[@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inner.call();
|
|
};
|
|
}
|
|
}
|
|
static method simpleClosure() → dart.core::int {
|
|
dart.core::int x = 5;
|
|
(dart.core::int) → dart.core::Null inc = (dart.core::int y) → dart.core::Null {
|
|
x = x.{dart.core::num::+}(y);
|
|
};
|
|
[@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] inc.call(3);
|
|
return x;
|
|
}
|
|
static method callWithArgs<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic, T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic, T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
|
|
dart.core::print(<dart.core::Type>[#lib::callWithArgs::T1, #lib::callWithArgs::T2, #lib::callWithArgs::T3, #lib::callWithArgs::T4, #lib::callWithArgs::T5, #lib::callWithArgs::T6, #lib::callWithArgs::T7, #lib::callWithArgs::T8]);
|
|
}
|
|
static method callA() → void {
|
|
new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<#lib::C3, #lib::C4>();
|
|
new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
|
|
new #lib::A::•<dart.core::List<#lib::C1>, dart.core::List<#lib::C2>>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
|
|
}
|
|
static method testPartialInstantiation() → (dart.core::int) → dynamic {
|
|
function foo<T extends dart.core::Object = dynamic>(T t) → void {}
|
|
(dart.core::int) → dynamic intFunc = foo<dart.core::int>;
|
|
return intFunc;
|
|
}
|
|
static method main() → dynamic {}
|
|
}
|