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