blob: a298e7fdcfac532eadeb77f6d2b3e86a4f66565d [file] [log] [blame]
library #lib;
import self as self;
import "dart:core" as core;
import "dart:ffi" as ffi;
import "dart:typed_data" as typ;
import "dart:ffi";
@#C10
final class MyStruct extends ffi::Struct {
synthetic constructor •() self::MyStruct
: super ffi::Struct::•()
;
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyStruct
: super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
;
@#C12
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyStruct
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
;
@#C13
@#C12
get a() core::int
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
@#C13
@#C12
set a(synthesized core::int #externalFieldValue) → void
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
@#C13
@#C12
get b() core::int
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
@#C13
@#C12
set b(synthesized core::int #externalFieldValue) → void
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
@#C15
@#C12
get array() ffi::Array<ffi::Int8>
return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16);
@#C15
@#C12
set array(synthesized ffi::Array<ffi::Int8> #externalFieldValue) → void
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C17.{core::List::[]}(ffi::_abi()){(core::int) → core::int});
@#C15
@#C12
get array2() ffi::Array<ffi::UnsignedLong>
return new ffi::Array::_<ffi::UnsignedLong>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C3, #C16);
@#C15
@#C12
set array2(synthesized ffi::Array<ffi::UnsignedLong> #externalFieldValue) → void
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::array2#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue.{ffi::_Compound::_typedDataBase}{core::Object}, #externalFieldValue.{ffi::_Compound::_offsetInBytes}{core::int}, #C20.{core::List::[]}(ffi::_abi()){(core::int) → core::int});
@#C12
static get a#offsetOf() → core::int
return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get b#offsetOf() → core::int
return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get array#offsetOf() → core::int
return #C26.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get array2#offsetOf() → core::int
return #C29.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get #sizeOf() → core::int
return #C32.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
}
@#C35
final class MyUnion extends ffi::Union {
synthetic constructor •() self::MyUnion
: super ffi::Union::•()
;
constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::MyUnion
: super ffi::Union::_fromTypedDataBase(#typedDataBase, #offsetInBytes)
;
@#C12
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion
: super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes)
;
@#C13
@#C12
get a() core::int
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
@#C13
@#C12
set a(synthesized core::int #externalFieldValue) → void
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
@#C13
@#C12
get b() core::int
return ffi::_loadInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num});
@#C13
@#C12
set b(synthesized core::int #externalFieldValue) → void
return ffi::_storeInt8(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyUnion::b#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #externalFieldValue);
@#C12
static get a#offsetOf() → core::int
return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get b#offsetOf() → core::int
return #C22.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C12
static get #sizeOf() → core::int
return #C24.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
}
static method main() void {
final self::MyStruct myStruct = new self::MyStruct::#fromTypedDataBase(typ::Uint8List::•(self::MyStruct::#sizeOf), #C21);
self::myNative#CC( block {
synthesized ffi::_Compound pointer#value = myStruct;
} =>new ffi::_Compound::_fromTypedDataBase(pointer#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(self::MyStruct::a#offsetOf){(core::num) → core::num}), block {
synthesized ffi::_Compound pointer2#value = myStruct;
} =>new ffi::_Compound::_fromTypedDataBase(pointer2#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer2#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(self::MyStruct::b#offsetOf){(core::num) → core::num}));
final self::MyUnion myUnion = new self::MyUnion::#fromTypedDataBase(typ::Uint8List::•(self::MyUnion::#sizeOf), #C21);
self::myNative#CC(myUnion, myUnion);
self::myNative#CC( block {
synthesized ffi::_Compound pointer#value = myStruct.{self::MyStruct::array}{ffi::Array<ffi::Int8>};
} =>new ffi::_Compound::_fromTypedDataBase(pointer#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#C23.{core::num::*}(3){(core::num) → core::num}){(core::num) → core::num}), block {
synthesized ffi::_Compound pointer2#value = myStruct.{self::MyStruct::array}{ffi::Array<ffi::Int8>};
} =>new ffi::_Compound::_fromTypedDataBase(pointer2#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer2#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(#C23.{core::num::*}(4){(core::num) → core::num}){(core::num) → core::num}));
self::myNative#CC( block {
synthesized ffi::_Compound pointer#value = myStruct.{self::MyStruct::array2}{ffi::Array<ffi::UnsignedLong>};
} =>new ffi::_Compound::_fromTypedDataBase(pointer#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(ffi::UnsignedLong::#sizeOf.{core::num::*}(3){(core::num) → core::num}){(core::num) → core::num}), block {
synthesized ffi::_Compound pointer2#value = myStruct.{self::MyStruct::array2}{ffi::Array<ffi::UnsignedLong>};
} =>new ffi::_Compound::_fromTypedDataBase(pointer2#value.{ffi::_Compound::_typedDataBase}{core::Object}, pointer2#value.{ffi::_Compound::_offsetInBytes}{core::int}.{core::num::+}(ffi::UnsignedLong::#sizeOf.{core::num::*}(4){(core::num) → core::num}){(core::num) → core::num}));
}
@#C41
@#C43
external static method myNative(ffi::Pointer<ffi::Int8> pointer, ffi::Pointer<ffi::Int8> pointer2) void;
@#C41
@#C43
external static method myNative#CC(ffi::_Compound pointer, ffi::_Compound pointer2) → void;
constants {
#C1 = "vm:ffi:struct-fields"
#C2 = TypeLiteralConstant(ffi::Int8)
#C3 = 10
#C4 = ffi::_FfiInlineArray {elementType:#C2, length:#C3}
#C5 = TypeLiteralConstant(ffi::UnsignedLong)
#C6 = ffi::_FfiInlineArray {elementType:#C5, length:#C3}
#C7 = <core::Type>[#C2, #C2, #C4, #C6]
#C8 = null
#C9 = ffi::_FfiStructLayout {fieldTypes:#C7, packing:#C8}
#C10 = core::pragma {name:#C1, options:#C9}
#C11 = "vm:prefer-inline"
#C12 = core::pragma {name:#C11, options:#C8}
#C13 = ffi::Int8 {}
#C14 = false
#C15 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C3, dimension2:#C8, dimension3:#C8, dimension4:#C8, dimension5:#C8, dimensions:#C8, variableLength:#C14}
#C16 = <core::int>[]
#C17 = <core::int>[#C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3, #C3]
#C18 = 40
#C19 = 80
#C20 = <core::int>[#C18, #C19, #C18, #C19, #C19, #C19, #C19, #C19, #C18, #C19, #C19, #C18, #C19, #C18, #C19, #C18, #C19, #C19, #C19, #C18, #C18, #C18]
#C21 = 0
#C22 = <core::int>[#C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21, #C21]
#C23 = 1
#C24 = <core::int>[#C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23, #C23]
#C25 = 2
#C26 = <core::int>[#C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25, #C25]
#C27 = 12
#C28 = 16
#C29 = <core::int>[#C27, #C28, #C27, #C28, #C28, #C28, #C28, #C28, #C27, #C28, #C28, #C27, #C28, #C27, #C28, #C27, #C28, #C28, #C28, #C27, #C27, #C27]
#C30 = 52
#C31 = 96
#C32 = <core::int>[#C30, #C31, #C30, #C31, #C31, #C31, #C31, #C31, #C30, #C31, #C31, #C30, #C31, #C30, #C31, #C30, #C31, #C31, #C31, #C30, #C30, #C30]
#C33 = <core::Type>[#C2, #C2]
#C34 = ffi::_FfiStructLayout {fieldTypes:#C33, packing:#C8}
#C35 = core::pragma {name:#C1, options:#C34}
#C36 = "cfe:ffi:native-marker"
#C37 = "myNative"
#C38 = "#lib"
#C39 = true
#C40 = ffi::Native<(ffi::Pointer<ffi::Int8>, ffi::Pointer<ffi::Int8>) → ffi::Void> {symbol:#C37, assetId:#C38, isLeaf:#C39}
#C41 = core::pragma {name:#C36, options:#C40}
#C42 = "vm:ffi:native"
#C43 = core::pragma {name:#C42, options:#C40}
}