blob: 2b217e2abfb4204e60107afd6af718083d2c00e8 [file] [log] [blame]
main = <No Member>;
//
// Problems in component:
//
// org-dartlang-test:///structs.dart:6:14: Error: Field 'zz' requires exactly one annotation to declare its native type, which cannot be Void. dart:ffi Structs and Unions cannot have regular Dart fields.
// external Z zz;
// ^
//
library from "org-dartlang-test:///structs.dart" as str {
//
// Problems in library:
//
// org-dartlang-test:///structs.dart:6:12: Error: 'Z' isn't a type.
// external Z zz;
// ^
//
// org-dartlang-test:///structs.dart:6:12: Error: Type 'Z' not found.
// external Z zz;
// ^
//
import "dart:ffi";
@#C6
class A extends dart.ffi::Struct {
synthetic constructor •() str::A
: super dart.ffi::Struct::•()
;
constructor #fromTypedDataBase(dart.core::Object #typedDataBase) → str::A
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
;
get yy() str::Y
return new str::Y::#fromTypedDataBase( block {
dart.core::Object #typedDataBase = this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object};
dart.core::int #offset = #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
} =>#typedDataBase is dart.ffi::Pointer<dynamic> ?{dart.core::Object} dart.ffi::_fromAddress<str::Y>(#typedDataBase.{dart.ffi::Pointer::address}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) dart.core::num}) : let dart.typed_data::TypedData #typedData = dart._internal::unsafeCast<dart.typed_data::TypedData>(#typedDataBase) in #typedData.{dart.typed_data::TypedData::buffer}{dart.typed_data::ByteBuffer}.{dart.typed_data::ByteBuffer::asUint8List}(#typedData.{dart.typed_data::TypedData::offsetInBytes}{dart.core::int}.{dart.core::num::+}(#offset){(dart.core::num) → dart.core::num}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}){([dart.core::int, dart.core::int?]) → dart.typed_data::Uint8List});
set yy(str::Y #externalFieldValue) → void
return dart.ffi::_memCopy(this.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*}, #externalFieldValue.{dart.ffi::_Compound::_typedDataBase}{dart.core::Object}, #C7, #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*});
@#C10
static get #sizeOf() → dart.core::int*
return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
class Y extends dart.ffi::Struct {
synthetic constructor •() str::Y
: super dart.ffi::Struct::•()
;
constructor #fromTypedDataBase(dart.core::Object #typedDataBase) → str::Y
: super dart.ffi::Struct::_fromTypedDataBase(#typedDataBase)
;
external get zz() invalid-type;
external set zz(invalid-type #externalFieldValue) → void;
@#C10
static get #sizeOf() → dart.core::int*
return #C8.{dart.core::List::[]}(dart.ffi::_abi()){(dart.core::int) → dart.core::int*};
}
}
constants {
#C1 = "vm:ffi:struct-fields"
#C2 = TypeLiteralConstant(str::Y)
#C3 = <dart.core::Type>[#C2]
#C4 = null
#C5 = dart.ffi::_FfiStructLayout {fieldTypes:#C3, packing:#C4}
#C6 = dart.core::pragma {name:#C1, options:#C5}
#C7 = 0
#C8 = <dart.core::int*>[#C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7, #C7]
#C9 = "vm:prefer-inline"
#C10 = dart.core::pragma {name:#C9, options:#C4}
}