blob: bc4b45d07832746eb271677fa8d5ac23fe0f8e07 [file] [log] [blame]
main = #lib::main;
[@vm.bytecode=
ComponentBytecodeMetadata {
Bytecode (version: stable)
Main library: #lib
}
] [@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'c1', type = #lib::A, getter = 'get:c1', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
}
Field 'c2', type = dart:core::String, reflectable, static, const, final
value = 'hello!'
Field 'c3', type = dart:core::int, reflectable, static, const, final
value = const 6
Field 'c4', type = #lib::C, getter = 'get:c4', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
}
Field 'c5', type = #lib::D, getter = 'get:c5', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
}
Field 'fieldWithDoubleLiteralInitializer', type = dart:core::double, reflectable, static
value = const 1.0
Function 'test_constants1', static, reflectable, debuggable
parameters [] (required: 0)
return-type void
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
DirectCall 1, CP#1
Drop1
PushConstant CP#3
DirectCall 1, CP#1
Drop1
PushInt 6
DirectCall 1, CP#1
Drop1
PushConstant CP#4
DirectCall 1, CP#1
Drop1
PushConstant CP#5
DirectCall 1, CP#1
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
[1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[2] = Reserved
[3] = ObjectRef 'hello!'
[4] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
[5] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
}
Function 'test_constants2', static, reflectable, debuggable
parameters [] (required: 0)
return-type void
Bytecode {
Entry 0
CheckStack 0
PushInt 42
DirectCall 1, CP#0
Drop1
PushConstant CP#2
DirectCall 1, CP#0
Drop1
PushConstant CP#3
DirectCall 1, CP#0
Drop1
PushConstant CP#4
DirectCall 1, CP#0
Drop1
PushConstant CP#5
DirectCall 1, CP#0
Drop1
PushConstant CP#6
DirectCall 1, CP#0
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
[2] = ObjectRef 'foo'
[3] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
[4] = ObjectRef const <dart:core::Object> [const 42, 'foo', dart:core::int]
[5] = ObjectRef const dart:core::_ImmutableMap < dart:core::String, #lib::A > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['E2', const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, 'E4', const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]}
[6] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::C {#lib::C::j (field): const 9, #lib::B::i (field): const 30}, #lib::D::y (field): const dart:core::_ImmutableMap < dart:core::String, dart:core::Object > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['foo', const 42, 'bar', const #lib::B {#lib::B::i (field): const 6}]}}
}
Function 'test_list_literal', static, reflectable, debuggable
parameters [dart:core::int 'a'] (required: 1)
return-type void
Bytecode {
Entry 1
CheckStack 0
PushConstant CP#0
StoreLocal r0
Push r0
PushInt 3
CreateArrayTOS
StoreLocal r0
Push r0
PushInt 0
PushInt 1
StoreIndexedTOS
Push r0
PushInt 1
Push FP[-5]
StoreIndexedTOS
Push r0
PushInt 2
PushInt 3
StoreIndexedTOS
DirectCall 2, CP#1
DirectCall 1, CP#3
Drop1
PushConstant CP#5
StoreLocal r0
Push r0
PushInt 3
CreateArrayTOS
StoreLocal r0
Push r0
PushInt 0
PushConstant CP#6
StoreIndexedTOS
Push r0
PushInt 1
Push FP[-5]
InterfaceCall 1, CP#7
StoreIndexedTOS
Push r0
PushInt 2
PushConstant CP#9
StoreIndexedTOS
DirectCall 2, CP#1
DirectCall 1, CP#3
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef < dart:core::int >
[1] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
[2] = Reserved
[3] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[4] = Reserved
[5] = ObjectRef < dart:core::String >
[6] = ObjectRef 'a'
[7] = InterfaceCall 'dart:core::int::toString', ArgDesc num-args 1, num-type-args 0, names []
[8] = Reserved
[9] = ObjectRef 'b'
}
Function 'test_map_literal', static, reflectable, debuggable
type-params <dart:core::Object T>
parameters [dart:core::int 'a', dart:core::int 'b', #lib::test_map_literal::TypeParam/0 'c'] (required: 3)
return-type void
Bytecode {
Entry 2
CheckStack 0
CheckFunctionTypeArgs 1, r0
PushConstant CP#0
PushConstant CP#1
PushInt 4
CreateArrayTOS
StoreLocal r1
Push r1
PushInt 0
PushInt 1
StoreIndexedTOS
Push r1
PushInt 1
Push FP[-7]
StoreIndexedTOS
Push r1
PushInt 2
Push FP[-6]
StoreIndexedTOS
Push r1
PushInt 3
PushInt 2
StoreIndexedTOS
DirectCall 2, CP#2
DirectCall 1, CP#4
Drop1
PushConstant CP#6
PushConstant CP#1
PushInt 4
CreateArrayTOS
StoreLocal r1
Push r1
PushInt 0
PushConstant CP#7
StoreIndexedTOS
Push r1
PushInt 1
Push FP[-7]
StoreIndexedTOS
Push r1
PushInt 2
Push FP[-6]
InterfaceCall 1, CP#8
StoreIndexedTOS
Push r1
PushInt 3
PushInt 3
StoreIndexedTOS
DirectCall 2, CP#2
DirectCall 1, CP#4
Drop1
PushNull
Push r0
InstantiateTypeArgumentsTOS 0, CP#10
PushConstant CP#11
DirectCall 2, CP#2
DirectCall 1, CP#4
Drop1
PushNull
Push r0
InstantiateTypeArgumentsTOS 0, CP#12
PushConstant CP#1
PushInt 2
CreateArrayTOS
StoreLocal r1
Push r1
PushInt 0
Push FP[-5]
StoreIndexedTOS
Push r1
PushInt 1
PushInt 4
StoreIndexedTOS
DirectCall 2, CP#2
DirectCall 1, CP#4
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef < dart:core::int, dart:core::int >
[1] = ObjectRef < dynamic >
[2] = DirectCall 'dart:core::Map::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
[3] = Reserved
[4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[5] = Reserved
[6] = ObjectRef < dart:core::String, dart:core::int >
[7] = ObjectRef 'foo'
[8] = InterfaceCall 'dart:core::int::toString', ArgDesc num-args 1, num-type-args 0, names []
[9] = Reserved
[10] = ObjectRef < dart:core::String, #lib::test_map_literal::TypeParam/0 >
[11] = ObjectRef const <dynamic> []
[12] = ObjectRef < #lib::test_map_literal::TypeParam/0, dart:core::int >
}
Function 'test_symbol', static, reflectable, debuggable
parameters [] (required: 0)
return-type void
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
DirectCall 1, CP#1
Drop1
PushConstant CP#3
DirectCall 1, CP#1
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const 'test_symbol'
[1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[2] = Reserved
[3] = ObjectRef const '_private_symbol'
}
Function 'test_type_literal', static, reflectable, debuggable
type-params <dart:core::Object T>
parameters [] (required: 0)
return-type void
Bytecode {
Entry 1
CheckStack 0
CheckFunctionTypeArgs 1, r0
PushConstant CP#0
DirectCall 1, CP#1
Drop1
PushNull
Push r0
InstantiateType CP#3
DirectCall 1, CP#1
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = Type dart:core::String
[1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
[2] = Reserved
[3] = Type #lib::test_type_literal::TypeParam/0
}
Function 'testGenericConstInstance', static, reflectable, debuggable
parameters [] (required: 0)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::F < dart:core::Map < dart:core::int, dart:core::String >, dart:core::int, dart:core::String > {}
}
Function 'testGenericFunctionTypeLiteral', static, reflectable, debuggable
parameters [] (required: 0)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = Type FunctionType <dart:core::Object X> (null::TypeParam/0) -> null::TypeParam/0
}
Function 'testFieldWithDoubleLiteralInitializer', static, reflectable, debuggable
parameters [] (required: 0)
return-type dynamic
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
PushStatic CP#0
ReturnTOS
}
ConstantPool {
[0] = StaticField #lib::fieldWithDoubleLiteralInitializer (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 {
typedef GenericFunctionType = <X extends dart.core::Object = dynamic>(X) X;
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'index', type = dart:core::int, getter = 'get:index', reflectable, final
value = null
Field '_name', type = dart:core::String, getter = 'get:_name', reflectable, final
value = null
Field 'values', type = dart:core::List < #lib::A >, getter = 'get:values', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
}
Field 'elem1', type = #lib::A, getter = 'get:elem1', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
}
Field 'elem2', type = #lib::A, getter = 'get:elem2', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
}
Field 'elem3', type = #lib::A, getter = 'get:elem3', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
}
Field 'elem4', type = #lib::A, getter = 'get:elem4', reflectable, static, const, final
initializer
Bytecode {
Entry 0
CheckStack 0
PushConstant CP#0
ReturnTOS
}
ConstantPool {
[0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
}
Function '', constructor, const, reflectable, debuggable
parameters [dart:core::int 'index', dart:core::String '_name'] (required: 2)
return-type #lib::A
Bytecode {
Entry 0
CheckStack 0
Push FP[-7]
Push FP[-6]
StoreFieldTOS CP#0
Push FP[-7]
Push FP[-5]
StoreFieldTOS CP#2
Push FP[-7]
DirectCall 1, CP#4
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = InstanceField #lib::A::index (field)
[1] = Reserved
[2] = InstanceField #lib::A::_name (field)
[3] = Reserved
[4] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[5] = Reserved
}
Function 'toString', reflectable, debuggable
parameters [] (required: 0)
return-type dart:core::String
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
DirectCall 1, CP#0
ReturnTOS
}
ConstantPool {
[0] = DirectCall '#lib::A::get:_name', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
}
}
}
] class A extends dart.core::Object {
final field dart.core::int index;
final field dart.core::String _name;
static const field dart.core::List<#lib::A> values = const <#lib::A>[#lib::A::elem1, #lib::A::elem2, #lib::A::elem3, #lib::A::elem4];
static const field #lib::A elem1 = const #lib::A::•(0, "A.elem1");
static const field #lib::A elem2 = const #lib::A::•(1, "A.elem2");
static const field #lib::A elem3 = const #lib::A::•(2, "A.elem3");
static const field #lib::A elem4 = const #lib::A::•(3, "A.elem4");
const constructor •(dart.core::int index, dart.core::String _name) #lib::A
: #lib::A::index = index, #lib::A::_name = _name, super dart.core::Object::•()
;
method toString() dart.core::String
return this.{=#lib::A::_name};
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'i', type = dart:core::int, getter = 'get:i', reflectable, final
value = null
Function '', constructor, const, reflectable, debuggable
parameters [dart:core::int 'i'] (required: 1)
return-type #lib::B
Bytecode {
Entry 0
CheckStack 0
Push FP[-6]
Push FP[-5]
StoreFieldTOS CP#0
Push FP[-6]
DirectCall 1, CP#2
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = InstanceField #lib::B::i (field)
[1] = Reserved
[2] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[3] = Reserved
}
}
}
] class B extends dart.core::Object {
final field dart.core::int i;
const constructor •(dart.core::int i) #lib::B
: #lib::B::i = i, super dart.core::Object::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'j', type = dart:core::int, getter = 'get:j', reflectable, final
value = null
Function '', constructor, const, reflectable, debuggable
parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
return-type #lib::C
Bytecode {
Entry 0
CheckStack 0
Push FP[-8]
Push FP[-7]
Push FP[-6]
AddInt
StoreFieldTOS CP#0
Push FP[-8]
Push FP[-5]
PushInt 5
MulInt
DirectCall 2, CP#2
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = InstanceField #lib::C::j (field)
[1] = Reserved
[2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
[3] = Reserved
}
}
}
] class C extends #lib::B {
final field dart.core::int j;
const constructor •(dart.core::int a, dart.core::int b, dart.core::int c) #lib::C
: #lib::C::j = a.{dart.core::num::+}(b), super #lib::B::•(c.{dart.core::num::*}(5))
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Field 'x', type = dynamic, getter = 'get:x', reflectable, final
value = null
Field 'y', type = dynamic, getter = 'get:y', reflectable, final
value = null
Function '', constructor, const, has-optional-positional-params, reflectable, debuggable
parameters [dynamic 'x', dynamic 'y'] (required: 1)
return-type #lib::D
Bytecode {
EntryOptional 2, 1, 0
LoadConstant r2, CP#0
Frame 0
CheckStack 0
Push r0
Push r1
StoreFieldTOS CP#1
Push r0
Push r2
StoreFieldTOS CP#3
Push r0
DirectCall 1, CP#5
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = ObjectRef null
[1] = InstanceField #lib::D::x (field)
[2] = Reserved
[3] = InstanceField #lib::D::y (field)
[4] = Reserved
[5] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[6] = Reserved
}
}
}
] class D extends dart.core::Object {
final field dynamic x;
final field dynamic y;
const constructor •(dynamic x, [dynamic y = null]) #lib::D
: #lib::D::x = x, #lib::D::y = y, super dart.core::Object::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', constructor, const, reflectable, debuggable
parameters [] (required: 0)
return-type #lib::E < #lib::E::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 E<T extends dart.core::Object = dynamic> extends dart.core::Object {
const constructor •() #lib::E<#lib::E::T>
: super dart.core::Object::•()
;
}
[@vm.bytecode=
MembersBytecodeMetadata {
Members {
Function '', constructor, const, reflectable, debuggable
parameters [] (required: 0)
return-type #lib::F < dart:core::Map < #lib::F::TypeParam/0, #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
Bytecode {
Entry 0
CheckStack 0
Push FP[-5]
DirectCall 1, CP#0
Drop1
PushNull
ReturnTOS
}
ConstantPool {
[0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
[1] = Reserved
}
}
}
] class F<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::E<dart.core::Map<#lib::F::P, #lib::F::Q>> {
const constructor •() #lib::F<#lib::F::P, #lib::F::Q>
: super #lib::E::•()
;
}
static const field #lib::A c1 = #lib::A::elem3;
static const field dart.core::String c2 = "hello!";
static const field dart.core::int c3 = #lib::c2.{dart.core::String::length};
static const field #lib::C c4 = const #lib::C::•(1, 2, 3);
static const field #lib::D c5 = const #lib::D::•(const #lib::B::•(4));
static field dart.core::double fieldWithDoubleLiteralInitializer = 1.0;
static method test_constants1() void {
dart.core::print(#lib::c1);
dart.core::print(#lib::c2);
dart.core::print(#lib::c3);
dart.core::print(#lib::c4);
dart.core::print(#lib::c5);
}
static method test_constants2() void {
dart.core::print(42);
dart.core::print("foo");
dart.core::print(#lib::A::elem2);
dart.core::print(const <dart.core::Object>[42, "foo", dart.core::int]);
dart.core::print(const <dart.core::String, #lib::A>{"E2": #lib::A::elem2, "E4": #lib::A::elem4});
dart.core::print(const #lib::D::•(const #lib::C::•(4, 5, 6), const <dart.core::String, dart.core::Object>{"foo": 42, "bar": const #lib::B::•(#lib::c2.{dart.core::String::length})}));
}
static method test_list_literal(dart.core::int a) void {
dart.core::print(<dart.core::int>[1, a, 3]);
dart.core::print(<dart.core::String>["a", a.{dart.core::int::toString}(), "b"]);
}
static method test_map_literal<T extends dart.core::Object = dynamic>(dart.core::int a, dart.core::int b, #lib::test_map_literal::T c) → void {
dart.core::print(<dart.core::int, dart.core::int>{1: a, b: 2});
dart.core::print(<dart.core::String, dart.core::int>{"foo": a, b.{dart.core::int::toString}(): 3});
dart.core::print(<dart.core::String, #lib::test_map_literal::T>{});
dart.core::print(<#lib::test_map_literal::T, dart.core::int>{c: 4});
}
static method test_symbol() void {
dart.core::print(#test_symbol);
dart.core::print(#_private_symbol);
}
static method test_type_literal<T extends dart.core::Object = dynamic>() void {
dart.core::print(dart.core::String);
dart.core::print(#lib::test_type_literal::T);
}
static method testGenericConstInstance() dynamic
return const #lib::F::•<dart.core::int, dart.core::String>();
static method testGenericFunctionTypeLiteral() dynamic
return <X extends dart.core::Object = dynamic>(X) X;
static method testFieldWithDoubleLiteralInitializer() dynamic
return #lib::fieldWithDoubleLiteralInitializer;
static method main() dynamic {}
}