| library #lib /*isNonNullableByDefault*/; |
| import self as self; |
| import "dart:ffi" as ffi; |
| import "dart:core" as core; |
| import "dart:typed_data" as typ; |
| import "dart:_internal" as _in; |
| |
| import "dart:ffi"; |
| |
| @#C56 |
| @#C64 |
| class WChar extends ffi::AbiSpecificInteger /*hasConstConstructor*/ { |
| const constructor •() → self::WChar |
| : super ffi::AbiSpecificInteger::•() |
| ; |
| @#C67 |
| static get #sizeOf() → core::int* |
| return #C69.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| } |
| @#C74 |
| class WCharStruct extends ffi::Struct { |
| synthetic constructor •() → self::WCharStruct |
| : super ffi::Struct::•() |
| ; |
| constructor #fromTypedDataBase(core::Object #typedDataBase) → self::WCharStruct |
| : super ffi::Struct::_fromTypedDataBase(#typedDataBase) |
| ; |
| @#C75 |
| get a0() → core::int |
| return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C76.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}); |
| @#C75 |
| set a0(core::int #externalFieldValue) → void |
| return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C76.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue); |
| @#C75 |
| get a1() → core::int |
| return ffi::_loadAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C69.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}); |
| @#C75 |
| set a1(core::int #externalFieldValue) → void |
| return ffi::_storeAbiSpecificInt<self::WChar>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C69.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue); |
| @#C67 |
| static get #sizeOf() → core::int* |
| return #C78.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| } |
| @#C83 |
| class WCharArrayStruct extends ffi::Struct { |
| synthetic constructor •() → self::WCharArrayStruct |
| : super ffi::Struct::•() |
| ; |
| constructor #fromTypedDataBase(core::Object #typedDataBase) → self::WCharArrayStruct |
| : super ffi::Struct::_fromTypedDataBase(#typedDataBase) |
| ; |
| @#C84 |
| get a0() → ffi::Array<self::WChar> |
| return new ffi::Array::_<self::WChar>( block { |
| core::Object #typedDataBase = this.{ffi::_Compound::_typedDataBase}{core::Object}; |
| core::int #offset = #C76.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| } =>#typedDataBase is ffi::Pointer<dynamic> ?{core::Object} ffi::_fromAddress<self::WChar>(#typedDataBase.{ffi::Pointer::address}{core::int}.{core::num::+}(#offset){(core::num) → core::num}) : let typ::TypedData #typedData = _in::unsafeCast<typ::TypedData>(#typedDataBase) in #typedData.{typ::TypedData::buffer}{typ::ByteBuffer}.{typ::ByteBuffer::asUint8List}(#typedData.{typ::TypedData::offsetInBytes}{core::int}.{core::num::+}(#offset){(core::num) → core::num}, #C88.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}){([core::int, core::int?]) → typ::Uint8List}, #C79, #C89); |
| @#C84 |
| set a0(ffi::Array<self::WChar> #externalFieldValue) → void |
| return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C76.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #externalFieldValue.{ffi::Array::_typedDataBase}{core::Object}, #C1, #C88.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}); |
| @#C67 |
| static get #sizeOf() → core::int* |
| return #C88.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| } |
| class _DummyAllocator extends core::Object implements ffi::Allocator /*hasConstConstructor*/ { |
| const constructor •() → self::_DummyAllocator |
| : super core::Object::•() |
| ; |
| @#C90 |
| method allocate<T extends ffi::NativeType>(core::int byteCount, {core::int? alignment = #C66}) → ffi::Pointer<self::_DummyAllocator::allocate::T> { |
| return ffi::Pointer::fromAddress<self::_DummyAllocator::allocate::T>(0); |
| } |
| @#C90 |
| method free(ffi::Pointer<ffi::NativeType> pointer) → void {} |
| } |
| static const field self::_DummyAllocator noAlloc = #C91; |
| static method main() → void { |
| self::testSizeOf(); |
| self::testStoreLoad(); |
| self::testStoreLoadIndexed(); |
| self::testStruct(); |
| self::testInlineArray(); |
| } |
| static method testSizeOf() → void { |
| final core::int size = self::WChar::#sizeOf; |
| core::print(size); |
| } |
| static method testStoreLoad() → void { |
| final ffi::Pointer<self::WChar> p = #C91.{ffi::Allocator::allocate}<self::WChar>(self::WChar::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WChar>}; |
| ffi::_storeAbiSpecificInt<self::WChar>(p, #C1, 10); |
| core::print(ffi::_loadAbiSpecificInt<self::WChar>(p, #C1)); |
| #C91.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void}; |
| } |
| static method testStoreLoadIndexed() → void { |
| final ffi::Pointer<self::WChar> p = #C91.{ffi::Allocator::allocate}<self::WChar>(2.{core::num::*}(self::WChar::#sizeOf){(core::num) → core::num}){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WChar>}; |
| ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 0, 10); |
| ffi::_storeAbiSpecificIntAtIndex<self::WChar>(p, 1, 3); |
| core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 0)); |
| core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(p, 1)); |
| #C91.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void}; |
| } |
| static method testStruct() → void { |
| final ffi::Pointer<self::WCharStruct> p = #C91.{ffi::Allocator::allocate}<self::WCharStruct>(self::WCharStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WCharStruct>}; |
| new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0} = 1; |
| core::print(new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0}{core::int}); |
| new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0} = 2; |
| core::print(new self::WCharStruct::#fromTypedDataBase(p!).{self::WCharStruct::a0}{core::int}); |
| #C91.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void}; |
| } |
| static method testInlineArray() → void { |
| final ffi::Pointer<self::WCharArrayStruct> p = #C91.{ffi::Allocator::allocate}<self::WCharArrayStruct>(self::WCharArrayStruct::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::WCharArrayStruct>}; |
| final ffi::Array<self::WChar> array = new self::WCharArrayStruct::#fromTypedDataBase(p!).{self::WCharArrayStruct::a0}{ffi::Array<self::WChar>}; |
| for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| ffi::_storeAbiSpecificIntAtIndex<self::WChar>(array.{ffi::Array::_typedDataBase}{core::Object}, i, i); |
| } |
| for (core::int i = 0; i.{core::num::<}(100){(core::num) → core::bool}; i = i.{core::num::+}(1){(core::num) → core::int}) { |
| core::print(ffi::_loadAbiSpecificIntAtIndex<self::WChar>(array.{ffi::Array::_typedDataBase}{core::Object}, i)); |
| } |
| #C91.{self::_DummyAllocator::free}(p){(ffi::Pointer<ffi::NativeType>) → void}; |
| } |
| constants { |
| #C1 = 0 |
| #C2 = "android" |
| #C3 = ffi::_OS {index:#C1, _name:#C2} |
| #C4 = "arm" |
| #C5 = ffi::_Architecture {index:#C1, _name:#C4} |
| #C6 = ffi::Abi {_os:#C3, _architecture:#C5} |
| #C7 = ffi::Uint32 {} |
| #C8 = 1 |
| #C9 = "arm64" |
| #C10 = ffi::_Architecture {index:#C8, _name:#C9} |
| #C11 = ffi::Abi {_os:#C3, _architecture:#C10} |
| #C12 = 2 |
| #C13 = "ia32" |
| #C14 = ffi::_Architecture {index:#C12, _name:#C13} |
| #C15 = ffi::Abi {_os:#C3, _architecture:#C14} |
| #C16 = 3 |
| #C17 = "x64" |
| #C18 = ffi::_Architecture {index:#C16, _name:#C17} |
| #C19 = ffi::Abi {_os:#C3, _architecture:#C18} |
| #C20 = "fuchsia" |
| #C21 = ffi::_OS {index:#C8, _name:#C20} |
| #C22 = ffi::Abi {_os:#C21, _architecture:#C10} |
| #C23 = ffi::Uint64 {} |
| #C24 = ffi::Abi {_os:#C21, _architecture:#C18} |
| #C25 = "ios" |
| #C26 = ffi::_OS {index:#C12, _name:#C25} |
| #C27 = ffi::Abi {_os:#C26, _architecture:#C5} |
| #C28 = ffi::Abi {_os:#C26, _architecture:#C10} |
| #C29 = ffi::Abi {_os:#C26, _architecture:#C18} |
| #C30 = "linux" |
| #C31 = ffi::_OS {index:#C16, _name:#C30} |
| #C32 = ffi::Abi {_os:#C31, _architecture:#C5} |
| #C33 = ffi::Abi {_os:#C31, _architecture:#C10} |
| #C34 = ffi::Abi {_os:#C31, _architecture:#C14} |
| #C35 = ffi::Int32 {} |
| #C36 = ffi::Abi {_os:#C31, _architecture:#C18} |
| #C37 = 4 |
| #C38 = "riscv32" |
| #C39 = ffi::_Architecture {index:#C37, _name:#C38} |
| #C40 = ffi::Abi {_os:#C31, _architecture:#C39} |
| #C41 = 5 |
| #C42 = "riscv64" |
| #C43 = ffi::_Architecture {index:#C41, _name:#C42} |
| #C44 = ffi::Abi {_os:#C31, _architecture:#C43} |
| #C45 = "macos" |
| #C46 = ffi::_OS {index:#C37, _name:#C45} |
| #C47 = ffi::Abi {_os:#C46, _architecture:#C10} |
| #C48 = ffi::Abi {_os:#C46, _architecture:#C18} |
| #C49 = "windows" |
| #C50 = ffi::_OS {index:#C41, _name:#C49} |
| #C51 = ffi::Abi {_os:#C50, _architecture:#C10} |
| #C52 = ffi::Uint16 {} |
| #C53 = ffi::Abi {_os:#C50, _architecture:#C14} |
| #C54 = ffi::Abi {_os:#C50, _architecture:#C18} |
| #C55 = <ffi::Abi*, ffi::NativeType*>{#C6:#C7, #C11:#C7, #C15:#C7, #C19:#C7, #C22:#C23, #C24:#C7, #C27:#C7, #C28:#C7, #C29:#C7, #C32:#C7, #C33:#C7, #C34:#C35, #C36:#C35, #C40:#C35, #C44:#C35, #C47:#C7, #C48:#C7, #C51:#C52, #C53:#C52, #C54:#C52) |
| #C56 = ffi::AbiSpecificIntegerMapping {mapping:#C55} |
| #C57 = "vm:ffi:abi-specific-mapping" |
| #C58 = TypeLiteralConstant(ffi::Uint32) |
| #C59 = TypeLiteralConstant(ffi::Uint64) |
| #C60 = TypeLiteralConstant(ffi::Int32) |
| #C61 = TypeLiteralConstant(ffi::Uint16) |
| #C62 = <core::Type?>[#C58, #C58, #C58, #C58, #C59, #C58, #C58, #C58, #C58, #C58, #C58, #C60, #C60, #C60, #C60, #C58, #C58, #C61, #C61, #C61] |
| #C63 = ffi::_FfiAbiSpecificMapping {nativeTypes:#C62} |
| #C64 = core::pragma {name:#C57, options:#C63} |
| #C65 = "vm:prefer-inline" |
| #C66 = null |
| #C67 = core::pragma {name:#C65, options:#C66} |
| #C68 = 8 |
| #C69 = <core::int*>[#C37, #C37, #C37, #C37, #C68, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C37, #C12, #C12, #C12] |
| #C70 = "vm:ffi:struct-fields" |
| #C71 = TypeLiteralConstant(self::WChar) |
| #C72 = <core::Type>[#C71, #C71] |
| #C73 = ffi::_FfiStructLayout {fieldTypes:#C72, packing:#C66} |
| #C74 = core::pragma {name:#C70, options:#C73} |
| #C75 = self::WChar {} |
| #C76 = <core::int*>[#C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1, #C1] |
| #C77 = 16 |
| #C78 = <core::int*>[#C68, #C68, #C68, #C68, #C77, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C68, #C37, #C37, #C37] |
| #C79 = 100 |
| #C80 = ffi::_FfiInlineArray {elementType:#C71, length:#C79} |
| #C81 = <core::Type>[#C80] |
| #C82 = ffi::_FfiStructLayout {fieldTypes:#C81, packing:#C66} |
| #C83 = core::pragma {name:#C70, options:#C82} |
| #C84 = ffi::_ArraySize<ffi::NativeType*> {dimension1:#C79, dimension2:#C66, dimension3:#C66, dimension4:#C66, dimension5:#C66, dimensions:#C66} |
| #C85 = 400 |
| #C86 = 800 |
| #C87 = 200 |
| #C88 = <core::int*>[#C85, #C85, #C85, #C85, #C86, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C85, #C87, #C87, #C87] |
| #C89 = <core::int*>[] |
| #C90 = core::_Override {} |
| #C91 = self::_DummyAllocator {} |
| } |