blob: 503e85dcfcec66dc0b0193e3008c9b4a30e63e35 [file]
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";
@#C3
@#C11
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)
;
@#C13
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyStruct
: super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes)
;
@#C14
@#C13
get a() ffi::Array<ffi::Int8>
return new ffi::Array::_<ffi::Int8>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #C6, #C7, #C15);
@#C14
@#C13
set a(synthesized ffi::Array<ffi::Int8> #externalFieldValue) → void
return ffi::_memCopy(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::MyStruct::a#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}, #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int});
@#C13
static synthetic get a#offsetOf() → core::int
return #C18.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C13
static get #sizeOf() → core::int
return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
}
@#C3
@#C21
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)
;
@#C13
constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::MyUnion
: super ffi::Union::_fromTypedData(#typedData, #offset, #sizeInBytes)
;
@#C22
@#C13
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});
@#C22
@#C13
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
static synthetic get a#offsetOf() → core::int
return #C18.{core::List::[]}(ffi::_abi()){(core::int) → core::int};
@#C13
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), #C17);
self::myNative#C(myStruct);
final self::MyUnion myUnion = new self::MyUnion::#fromTypedDataBase(typ::Uint8List::•(self::MyUnion::#sizeOf), #C17);
self::myNative2#C(myUnion);
self::myNative3#C(myStruct.{self::MyStruct::a}{ffi::Array<ffi::Int8>});
}
@#C30
@#C32
external static method myNative(ffi::Pointer<self::MyStruct> pointer) void;
@#C35
@#C36
external static method myNative2(ffi::Pointer<self::MyUnion> pointer) void;
@#C39
@#C40
external static method myNative3(ffi::Pointer<ffi::Int8> pointer) void;
@#C30
@#C32
external static method myNative#C(ffi::_Compound pointer) → void;
@#C35
@#C36
external static method myNative2#C(ffi::_Compound pointer) → void;
@#C39
@#C40
external static method myNative3#C(ffi::_Compound pointer) → void;
constants {
#C1 = "vm:deeply-immutable"
#C2 = null
#C3 = core::pragma {name:#C1, options:#C2}
#C4 = "vm:ffi:struct-fields"
#C5 = TypeLiteralConstant(ffi::Int8)
#C6 = 10
#C7 = false
#C8 = ffi::_FfiInlineArray {elementType:#C5, length:#C6, variableLength:#C7}
#C9 = <core::Type>[#C8]
#C10 = ffi::_FfiStructLayout {fieldTypes:#C9, packing:#C2}
#C11 = core::pragma {name:#C4, options:#C10}
#C12 = "vm:prefer-inline"
#C13 = core::pragma {name:#C12, options:#C2}
#C14 = ffi::_ArraySize<ffi::NativeType> {dimension1:#C6, dimension2:#C2, dimension3:#C2, dimension4:#C2, dimension5:#C2, dimensions:#C2, variableDimension:#C2}
#C15 = <core::int>[]
#C16 = <core::int>[#C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6, #C6]
#C17 = 0
#C18 = <core::int>[#C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17]
#C19 = <core::Type>[#C5]
#C20 = ffi::_FfiStructLayout {fieldTypes:#C19, packing:#C2}
#C21 = core::pragma {name:#C4, options:#C20}
#C22 = ffi::Int8 {}
#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 = "cfe:ffi:native-marker"
#C26 = "myNative"
#C27 = "#lib"
#C28 = true
#C29 = ffi::Native<(ffi::Pointer<self::MyStruct>) → ffi::Void> {symbol:#C26, assetId:#C27, isLeaf:#C28}
#C30 = core::pragma {name:#C25, options:#C29}
#C31 = "vm:ffi:native"
#C32 = core::pragma {name:#C31, options:#C29}
#C33 = "myNative2"
#C34 = ffi::Native<(ffi::Pointer<self::MyUnion>) → ffi::Void> {symbol:#C33, assetId:#C27, isLeaf:#C28}
#C35 = core::pragma {name:#C25, options:#C34}
#C36 = core::pragma {name:#C31, options:#C34}
#C37 = "myNative3"
#C38 = ffi::Native<(ffi::Pointer<ffi::Int8>) → ffi::Void> {symbol:#C37, assetId:#C27, isLeaf:#C28}
#C39 = core::pragma {name:#C25, options:#C38}
#C40 = core::pragma {name:#C31, options:#C38}
}