| library /*isLegacy*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/general/ffi_sample.dart:5:1: Error: Library doesn't support null safety. |
| // // @dart=2.6 |
| // ^^^^^^^^^^^^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:ffi" as ffi; |
| import "dart:typed_data" as typ; |
| |
| import "dart:ffi"; |
| import "package:ffi/ffi.dart"; |
| |
| @#C7 |
| class Coordinate extends ffi::Struct { |
| constructor #fromTypedDataBase(synthesized core::Object #typedDataBase, synthesized core::int #offsetInBytes) → self::Coordinate |
| : super ffi::Struct::_fromTypedDataBase(#typedDataBase, #offsetInBytes) |
| ; |
| constructor #fromTypedData(synthesized typ::TypedData #typedData, synthesized core::int #offset, synthesized core::int #sizeInBytes) → self::Coordinate |
| : super ffi::Struct::_fromTypedData(#typedData, #offset, #sizeInBytes) |
| ; |
| static factory allocate(ffi::Allocator* allocator, core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* { |
| return let final self::Coordinate* #t1 = new self::Coordinate::#fromTypedDataBase(allocator.{ffi::Allocator::allocate}<self::Coordinate*>(self::Coordinate::#sizeOf){(core::int, {alignment: core::int?}) → ffi::Pointer<self::Coordinate*>}!, #C8) in block { |
| #t1.{self::Coordinate::x} = x; |
| #t1.{self::Coordinate::y} = y; |
| #t1.{self::Coordinate::next} = next; |
| } =>#t1; |
| } |
| abstract member-signature method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod |
| abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase |
| abstract member-signature get _offsetInBytes() → core::int*; -> ffi::_Compound::_offsetInBytes |
| abstract member-signature get _identityHashCode() → core::int*; -> core::Object::_identityHashCode |
| abstract member-signature method _instanceOf(dynamic instantiatorTypeArguments, dynamic functionTypeArguments, dynamic type) → core::bool*; -> core::Object::_instanceOf |
| abstract member-signature method _simpleInstanceOf(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOf |
| abstract member-signature method _simpleInstanceOfTrue(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfTrue |
| abstract member-signature method _simpleInstanceOfFalse(dynamic type) → core::bool*; -> core::Object::_simpleInstanceOfFalse |
| abstract member-signature operator ==(dynamic other) → core::bool*; -> core::Object::== |
| abstract member-signature get hashCode() → core::int*; -> core::Object::hashCode |
| abstract member-signature method toString() → core::String*; -> core::Object::toString |
| abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType |
| @#C10 |
| static get /*isNonNullableByDefault*/ x#offsetOf() → core::int |
| return #C11.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| @#C12 |
| get x() → core::double* |
| return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); |
| set x(synthesized core::double* #v) → void |
| return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::x#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v); |
| @#C10 |
| static get /*isNonNullableByDefault*/ y#offsetOf() → core::int |
| return #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| @#C12 |
| get y() → core::double* |
| return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); |
| set y(synthesized core::double* #v) → void |
| return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::y#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v); |
| @#C10 |
| static get /*isNonNullableByDefault*/ next#offsetOf() → core::int |
| return #C16.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| get next() → ffi::Pointer<self::Coordinate*>* |
| return ffi::_loadPointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}); |
| set next(synthesized ffi::Pointer<self::Coordinate*>* #v) → void |
| return ffi::_storePointer<self::Coordinate*>(this.{ffi::_Compound::_typedDataBase}{core::Object}, self::Coordinate::next#offsetOf.{core::num::+}(this.{ffi::_Compound::_offsetInBytes}{core::int}){(core::num) → core::num}, #v); |
| @#C10 |
| static get /*isNonNullableByDefault*/ #sizeOf() → core::int* |
| return #C19.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}; |
| } |
| static method main() → dynamic {} |
| |
| constants { |
| #C1 = "vm:ffi:struct-fields" |
| #C2 = TypeLiteralConstant(ffi::Double) |
| #C3 = TypeLiteralConstant(ffi::Pointer<core::Object>) |
| #C4 = <core::Type>[#C2, #C2, #C3] |
| #C5 = null |
| #C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5} |
| #C7 = core::pragma {name:#C1, options:#C6} |
| #C8 = 0 |
| #C9 = "vm:prefer-inline" |
| #C10 = core::pragma {name:#C9, options:#C5} |
| #C11 = <core::int*>[#C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8, #C8] |
| #C12 = ffi::Double {} |
| #C13 = 8 |
| #C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13] |
| #C15 = 16 |
| #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 = 24 |
| #C18 = 20 |
| #C19 = <core::int*>[#C17, #C17, #C18, #C17, #C17, #C17, #C17, #C17, #C18, #C17, #C17, #C17, #C17, #C18, #C17, #C17, #C17, #C17, #C17, #C17, #C17, #C17] |
| } |
| |
| |
| Constructor coverage from constants: |
| org-dartlang-testcase:///ffi_sample.dart: |
| - Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart) |
| - Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart) |