5ca6eec782
Closes: https://github.com/dart-lang/sdk/issues/48711 Change-Id: Iac0bcecdf81b02bcb2feb746aa94a1bef6caf600 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240045 Reviewed-by: Lasse Nielsen <lrn@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
81 lines
4.8 KiB
Plaintext
81 lines
4.8 KiB
Plaintext
library;
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
import "dart:ffi" as ffi;
|
|
|
|
import "dart:ffi";
|
|
import "package:ffi/ffi.dart";
|
|
|
|
@#C7
|
|
class Coordinate extends ffi::Struct {
|
|
constructor #fromTypedDataBase(core::Object #typedDataBase) → self::Coordinate
|
|
: super ffi::Struct::_fromTypedDataBase(#typedDataBase)
|
|
;
|
|
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*>}!) in block {
|
|
#t1.{self::Coordinate::x} = x;
|
|
#t1.{self::Coordinate::y} = y;
|
|
#t1.{self::Coordinate::next} = next;
|
|
} =>#t1;
|
|
}
|
|
abstract member-signature get _typedDataBase() → core::Object*; -> ffi::_Compound::_typedDataBase
|
|
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 method noSuchMethod(core::Invocation* invocation) → dynamic; -> core::Object::noSuchMethod
|
|
abstract member-signature get runtimeType() → core::Type*; -> core::Object::runtimeType
|
|
@#C8
|
|
get x() → core::double*
|
|
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
|
set x(core::double* #v) → void
|
|
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C10.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
|
|
@#C8
|
|
get y() → core::double*
|
|
return ffi::_loadDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*});
|
|
set y(core::double* #v) → void
|
|
return ffi::_storeDouble(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C12.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v);
|
|
get next() → ffi::Pointer<self::Coordinate*>*
|
|
return ffi::_fromAddress<self::Coordinate*>(ffi::_loadAbiSpecificInt<ffi::IntPtr>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}));
|
|
set next(ffi::Pointer<self::Coordinate*>* #v) → void
|
|
return ffi::_storeAbiSpecificInt<ffi::IntPtr>(this.{ffi::_Compound::_typedDataBase}{core::Object}, #C14.{core::List::[]}(ffi::_abi()){(core::int) → core::int*}, #v.{ffi::Pointer::address}{core::int});
|
|
@#C16
|
|
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<ffi::NativeType>)
|
|
#C4 = <core::Type>[#C2, #C2, #C3]
|
|
#C5 = null
|
|
#C6 = ffi::_FfiStructLayout {fieldTypes:#C4, packing:#C5}
|
|
#C7 = core::pragma {name:#C1, options:#C6}
|
|
#C8 = ffi::Double {}
|
|
#C9 = 0
|
|
#C10 = <core::int*>[#C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9, #C9]
|
|
#C11 = 8
|
|
#C12 = <core::int*>[#C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11, #C11]
|
|
#C13 = 16
|
|
#C14 = <core::int*>[#C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13, #C13]
|
|
#C15 = "vm:prefer-inline"
|
|
#C16 = core::pragma {name:#C15, options:#C5}
|
|
#C17 = 24
|
|
#C18 = 20
|
|
#C19 = <core::int*>[#C17, #C17, #C18, #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:115:9)
|
|
- _NativeDouble. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:35:9)
|
|
- NativeType. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:12:9)
|
|
- Object. (from org-dartlang-sdk:///sdk/lib/core/object.dart:25:9)
|