[cfe/test/ffi] Move ffi_sample.dart to nnbd folder
Bumps `package:ffi` to a version using `?`.
Moves `ffi_sample.dart` from `general` to `nnbd` to prevent errors on
the usage of `?` in `package:ffi`.
Change-Id: I8bce1850ce4d144174a2e3705b0ae00523b45c73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178201
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
diff --git a/DEPS b/DEPS
index 70da9eb..b9546ff 100644
--- a/DEPS
+++ b/DEPS
@@ -102,7 +102,7 @@
"chromedriver_tag": "83.0.4103.39",
"dartdoc_rev" : "a1d86f2c992f4660ddcc09b27733396e92765d2a",
- "ffi_rev": "a5d4232cd38562c75a3ed847baa340e399538028",
+ "ffi_rev": "31352979f261f7c6ea88fa0a2cfb0fdd004c38fb",
"fixnum_rev": "16d3890c6dc82ca629659da1934e412292508bba",
"file_rev": "0e09370f581ab6388d46fda4cdab66638c0171a1",
"glob_rev": "7c0ef8d4fa086f6b185c4dd724b700e7d7ad8f79",
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.outline.expect b/pkg/front_end/testcases/general/ffi_sample.dart.outline.expect
deleted file mode 100644
index c1e27d7..0000000
--- a/pkg/front_end/testcases/general/ffi_sample.dart.outline.expect
+++ /dev/null
@@ -1,36 +0,0 @@
-library;
-import self as self;
-import "dart:ffi" as ffi;
-import "dart:core" as core;
-
-import "dart:ffi";
-import "package:ffi/ffi.dart";
-
-class Coordinate extends ffi::Struct {
- @ffi::Double::•()
- field core::double* x;
- @ffi::Double::•()
- field core::double* y;
- field ffi::Pointer<self::Coordinate*>* next;
- static factory allocate(core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate*
- ;
- abstract member-signature get _addressOf() → core::Object*; -> ffi::Struct::_addressOf
- 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
-}
-static method main() → dynamic
- ;
-
-
-Extra constant evaluation status:
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:13:4 -> InstanceConstant(const Double{})
-Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:16:4 -> InstanceConstant(const Double{})
-Extra constant evaluation: evaluated: 2, effectively constant: 2
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.strong.expect b/pkg/front_end/testcases/general/ffi_sample.dart.strong.expect
deleted file mode 100644
index 7121f54..0000000
--- a/pkg/front_end/testcases/general/ffi_sample.dart.strong.expect
+++ /dev/null
@@ -1,44 +0,0 @@
-library;
-import self as self;
-import "dart:ffi" as ffi;
-import "dart:core" as core;
-import "package:ffi/src/allocation.dart" as all;
-
-import "dart:ffi";
-import "package:ffi/ffi.dart";
-
-class Coordinate extends ffi::Struct {
- @#C1
- field core::double* x = null;
- @#C1
- field core::double* y = null;
- field ffi::Pointer<self::Coordinate*>* next = null;
- static factory allocate(core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
- return let final self::Coordinate* #t1 = ffi::StructPointer|get#ref<self::Coordinate*>(all::allocate<self::Coordinate*>()) in block {
- #t1.{self::Coordinate::x} = x;
- #t1.{self::Coordinate::y} = y;
- #t1.{self::Coordinate::next} = next;
- } =>#t1;
- }
- abstract member-signature get _addressOf() → core::Object*; -> ffi::Struct::_addressOf
- 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
-}
-static method main() → dynamic {}
-
-constants {
- #C1 = ffi::Double {}
-}
-
-
-Constructor coverage from constants:
-org-dartlang-testcase:///ffi_sample.dart:
-- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
deleted file mode 100644
index 906fb3f..0000000
--- a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
+++ /dev/null
@@ -1,75 +0,0 @@
-library;
-import self as self;
-import "dart:core" as core;
-import "dart:ffi" as ffi;
-import "package:ffi/src/allocation.dart" as all;
-
-import "dart:ffi";
-import "package:ffi/ffi.dart";
-
-@#C3
-@#C8
-class Coordinate extends ffi::Struct {
- @#C3
- static final field core::int* #sizeOf = (#C11).{core::List::[]}(ffi::_abi());
- @#C3
- constructor #fromTypedDataBase(dynamic #pointer) → dynamic
- : super ffi::Struct::_fromPointer(#pointer)
- ;
- static factory allocate(core::double* x, core::double* y, ffi::Pointer<self::Coordinate*>* next) → self::Coordinate* {
- return let final self::Coordinate* #t1 = ffi::StructPointer|get#ref<self::Coordinate*>(all::allocate<self::Coordinate*>()) in block {
- #t1.{self::Coordinate::x} = x;
- #t1.{self::Coordinate::y} = y;
- #t1.{self::Coordinate::next} = next;
- } =>#t1;
- }
- abstract member-signature get _addressOf() → core::Object*; -> ffi::Struct::_addressOf
- 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
- get x() → core::double*
- return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C13).{core::List::[]}(ffi::_abi()));
- set x(core::double* #v) → void
- return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C13).{core::List::[]}(ffi::_abi()), #v);
- get y() → core::double*
- return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C15).{core::List::[]}(ffi::_abi()));
- set y(core::double* #v) → void
- return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C15).{core::List::[]}(ffi::_abi()), #v);
- get next() → ffi::Pointer<self::Coordinate*>*
- return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::Struct::_addressOf}, (#C17).{core::List::[]}(ffi::_abi())));
- set next(ffi::Pointer<self::Coordinate*>* #v) → void
- return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C17).{core::List::[]}(ffi::_abi()), #v.{ffi::Pointer::address});
-}
-static method main() → dynamic {}
-
-constants {
- #C1 = "vm:entry-point"
- #C2 = null
- #C3 = core::pragma {name:#C1, options:#C2}
- #C4 = "vm:ffi:struct-fields"
- #C5 = TypeLiteralConstant(ffi::Double)
- #C6 = TypeLiteralConstant(ffi::Pointer<ffi::NativeType>)
- #C7 = <core::Type>[#C5, #C5, #C6]
- #C8 = core::pragma {name:#C4, options:#C7}
- #C9 = 24
- #C10 = 20
- #C11 = <core::int*>[#C9, #C10, #C9]
- #C12 = 0
- #C13 = <core::int*>[#C12, #C12, #C12]
- #C14 = 8
- #C15 = <core::int*>[#C14, #C14, #C14]
- #C16 = 16
- #C17 = <core::int*>[#C16, #C16, #C16]
-}
-
-
-Constructor coverage from constants:
-org-dartlang-testcase:///ffi_sample.dart:
-- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline_modelled.expect b/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline_modelled.expect
deleted file mode 100644
index 2b9a9f6..0000000
--- a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline_modelled.expect
+++ /dev/null
@@ -1,13 +0,0 @@
-import "package:ffi/ffi.dart";
-import 'dart:ffi';
-
-class Coordinate extends Struct {
- Pointer<Coordinate> next;
- @Double()
- double x;
- @Double()
- double y;
- factory Coordinate.allocate(double x, double y, Pointer<Coordinate> next) {}
-}
-
-main() {}
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart b/pkg/front_end/testcases/nnbd/ffi_sample.dart
similarity index 88%
rename from pkg/front_end/testcases/general/ffi_sample.dart
rename to pkg/front_end/testcases/nnbd/ffi_sample.dart
index db95797..0c7f870 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart
@@ -11,12 +11,12 @@
/// Sample struct for dart:ffi library.
class Coordinate extends Struct {
@Double()
- double x;
+ external double x;
@Double()
- double y;
+ external double y;
- Pointer<Coordinate> next;
+ external Pointer<Coordinate> next;
factory Coordinate.allocate(double x, double y, Pointer<Coordinate> next) {
return allocate<Coordinate>().ref
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.outline.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.outline.expect
new file mode 100644
index 0000000..915c142
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.outline.expect
@@ -0,0 +1,32 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:ffi" as ffi;
+import "dart:core" as core;
+
+import "dart:ffi";
+import "package:ffi/ffi.dart";
+
+class Coordinate extends ffi::Struct {
+ @ffi::Double::•()
+ external get x() → core::double;
+ @ffi::Double::•()
+ external set x(core::double #externalFieldValue) → void;
+ @ffi::Double::•()
+ external get y() → core::double;
+ @ffi::Double::•()
+ external set y(core::double #externalFieldValue) → void;
+ external get next() → ffi::Pointer<self::Coordinate>;
+ external set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void;
+ static factory allocate(core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate
+ ;
+}
+static method main() → dynamic
+ ;
+
+
+Extra constant evaluation status:
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:13:4 -> InstanceConstant(const Double{})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:13:4 -> InstanceConstant(const Double{})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:16:4 -> InstanceConstant(const Double{})
+Evaluated: ConstructorInvocation @ org-dartlang-testcase:///ffi_sample.dart:16:4 -> InstanceConstant(const Double{})
+Extra constant evaluation: evaluated: 4, effectively constant: 4
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.expect
new file mode 100644
index 0000000..0b6b078
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:ffi" as ffi;
+import "dart:core" as core;
+import "package:ffi/src/allocation.dart" as all;
+
+import "dart:ffi";
+import "package:ffi/ffi.dart";
+
+class Coordinate extends ffi::Struct {
+ @#C1
+ external get x() → core::double;
+ @#C1
+ external set x(core::double #externalFieldValue) → void;
+ @#C1
+ external get y() → core::double;
+ @#C1
+ external set y(core::double #externalFieldValue) → void;
+ external get next() → ffi::Pointer<self::Coordinate>;
+ external set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void;
+ static factory allocate(core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
+ return let final self::Coordinate #t1 = ffi::StructPointer|get#ref<self::Coordinate>(all::allocate<self::Coordinate>()) in block {
+ #t1.{self::Coordinate::x} = x;
+ #t1.{self::Coordinate::y} = y;
+ #t1.{self::Coordinate::next} = next;
+ } =>#t1;
+ }
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = ffi::Double {}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///ffi_sample.dart:
+- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
new file mode 100644
index 0000000..92815a2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.strong.transformed.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:ffi" as ffi;
+import "package:ffi/src/allocation.dart" as all;
+
+import "dart:ffi";
+import "package:ffi/ffi.dart";
+
+@#C3
+@#C8
+class Coordinate extends ffi::Struct {
+ @#C3
+ static final field core::int* #sizeOf = (#C11).{core::List::[]}(ffi::_abi())/*isLegacy*/;
+ @#C3
+ constructor #fromTypedDataBase(dynamic #pointer) → dynamic
+ : super ffi::Struct::_fromPointer(#pointer)
+ ;
+ @#C12
+ get x() → core::double
+ return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C14).{core::List::[]}(ffi::_abi()));
+ @#C12
+ set x(core::double #externalFieldValue) → void
+ return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C14).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ @#C12
+ get y() → core::double
+ return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C16).{core::List::[]}(ffi::_abi()));
+ @#C12
+ set y(core::double #externalFieldValue) → void
+ return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C16).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ get next() → ffi::Pointer<self::Coordinate>
+ return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::Struct::_addressOf}, (#C18).{core::List::[]}(ffi::_abi())));
+ set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
+ return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C18).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Pointer::address});
+ static factory allocate(core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
+ return let final self::Coordinate #t1 = ffi::StructPointer|get#ref<self::Coordinate>(all::allocate<self::Coordinate>()) in block {
+ #t1.{self::Coordinate::x} = x;
+ #t1.{self::Coordinate::y} = y;
+ #t1.{self::Coordinate::next} = next;
+ } =>#t1;
+ }
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = "vm:entry-point"
+ #C2 = null
+ #C3 = core::pragma {name:#C1, options:#C2}
+ #C4 = "vm:ffi:struct-fields"
+ #C5 = TypeLiteralConstant(ffi::Double)
+ #C6 = TypeLiteralConstant(ffi::Pointer<ffi::NativeType>)
+ #C7 = <core::Type>[#C5, #C5, #C6]
+ #C8 = core::pragma {name:#C4, options:#C7}
+ #C9 = 24
+ #C10 = 20
+ #C11 = <core::int*>[#C9, #C10, #C9]
+ #C12 = ffi::Double {}
+ #C13 = 0
+ #C14 = <core::int*>[#C13, #C13, #C13]
+ #C15 = 8
+ #C16 = <core::int*>[#C15, #C15, #C15]
+ #C17 = 16
+ #C18 = <core::int*>[#C17, #C17, #C17]
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///ffi_sample.dart:
+- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline.expect
similarity index 71%
copy from pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect
copy to pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline.expect
index eb10d58..f21ecbe 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline.expect
@@ -3,10 +3,10 @@
class Coordinate extends Struct {
@Double()
- double x;
+ external double x;
@Double()
- double y;
- Pointer<Coordinate> next;
+ external double y;
+ external Pointer<Coordinate> next;
factory Coordinate.allocate(double x, double y, Pointer<Coordinate> next) {}
}
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline_modelled.expect
similarity index 71%
rename from pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect
rename to pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline_modelled.expect
index eb10d58..263267c 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart.textual_outline.expect
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.textual_outline_modelled.expect
@@ -1,12 +1,12 @@
-import 'dart:ffi';
import "package:ffi/ffi.dart";
+import 'dart:ffi';
class Coordinate extends Struct {
+ external Pointer<Coordinate> next;
@Double()
- double x;
+ external double x;
@Double()
- double y;
- Pointer<Coordinate> next;
+ external double y;
factory Coordinate.allocate(double x, double y, Pointer<Coordinate> next) {}
}
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.expect
new file mode 100644
index 0000000..0b6b078
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.expect
@@ -0,0 +1,38 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:ffi" as ffi;
+import "dart:core" as core;
+import "package:ffi/src/allocation.dart" as all;
+
+import "dart:ffi";
+import "package:ffi/ffi.dart";
+
+class Coordinate extends ffi::Struct {
+ @#C1
+ external get x() → core::double;
+ @#C1
+ external set x(core::double #externalFieldValue) → void;
+ @#C1
+ external get y() → core::double;
+ @#C1
+ external set y(core::double #externalFieldValue) → void;
+ external get next() → ffi::Pointer<self::Coordinate>;
+ external set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void;
+ static factory allocate(core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
+ return let final self::Coordinate #t1 = ffi::StructPointer|get#ref<self::Coordinate>(all::allocate<self::Coordinate>()) in block {
+ #t1.{self::Coordinate::x} = x;
+ #t1.{self::Coordinate::y} = y;
+ #t1.{self::Coordinate::next} = next;
+ } =>#t1;
+ }
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = ffi::Double {}
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///ffi_sample.dart:
+- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)
diff --git a/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
new file mode 100644
index 0000000..92815a2
--- /dev/null
+++ b/pkg/front_end/testcases/nnbd/ffi_sample.dart.weak.transformed.expect
@@ -0,0 +1,69 @@
+library /*isNonNullableByDefault*/;
+import self as self;
+import "dart:core" as core;
+import "dart:ffi" as ffi;
+import "package:ffi/src/allocation.dart" as all;
+
+import "dart:ffi";
+import "package:ffi/ffi.dart";
+
+@#C3
+@#C8
+class Coordinate extends ffi::Struct {
+ @#C3
+ static final field core::int* #sizeOf = (#C11).{core::List::[]}(ffi::_abi())/*isLegacy*/;
+ @#C3
+ constructor #fromTypedDataBase(dynamic #pointer) → dynamic
+ : super ffi::Struct::_fromPointer(#pointer)
+ ;
+ @#C12
+ get x() → core::double
+ return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C14).{core::List::[]}(ffi::_abi()));
+ @#C12
+ set x(core::double #externalFieldValue) → void
+ return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C14).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ @#C12
+ get y() → core::double
+ return ffi::_loadDouble(this.{ffi::Struct::_addressOf}, (#C16).{core::List::[]}(ffi::_abi()));
+ @#C12
+ set y(core::double #externalFieldValue) → void
+ return ffi::_storeDouble(this.{ffi::Struct::_addressOf}, (#C16).{core::List::[]}(ffi::_abi()), #externalFieldValue);
+ get next() → ffi::Pointer<self::Coordinate>
+ return ffi::_fromAddress<self::Coordinate>(ffi::_loadIntPtr(this.{ffi::Struct::_addressOf}, (#C18).{core::List::[]}(ffi::_abi())));
+ set next(ffi::Pointer<self::Coordinate> #externalFieldValue) → void
+ return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C18).{core::List::[]}(ffi::_abi()), #externalFieldValue.{ffi::Pointer::address});
+ static factory allocate(core::double x, core::double y, ffi::Pointer<self::Coordinate> next) → self::Coordinate {
+ return let final self::Coordinate #t1 = ffi::StructPointer|get#ref<self::Coordinate>(all::allocate<self::Coordinate>()) in block {
+ #t1.{self::Coordinate::x} = x;
+ #t1.{self::Coordinate::y} = y;
+ #t1.{self::Coordinate::next} = next;
+ } =>#t1;
+ }
+}
+static method main() → dynamic {}
+
+constants {
+ #C1 = "vm:entry-point"
+ #C2 = null
+ #C3 = core::pragma {name:#C1, options:#C2}
+ #C4 = "vm:ffi:struct-fields"
+ #C5 = TypeLiteralConstant(ffi::Double)
+ #C6 = TypeLiteralConstant(ffi::Pointer<ffi::NativeType>)
+ #C7 = <core::Type>[#C5, #C5, #C6]
+ #C8 = core::pragma {name:#C4, options:#C7}
+ #C9 = 24
+ #C10 = 20
+ #C11 = <core::int*>[#C9, #C10, #C9]
+ #C12 = ffi::Double {}
+ #C13 = 0
+ #C14 = <core::int*>[#C13, #C13, #C13]
+ #C15 = 8
+ #C16 = <core::int*>[#C15, #C15, #C15]
+ #C17 = 16
+ #C18 = <core::int*>[#C17, #C17, #C17]
+}
+
+
+Constructor coverage from constants:
+org-dartlang-testcase:///ffi_sample.dart:
+- Double. (from org-dartlang-sdk:///sdk/lib/ffi/native_type.dart:116:9)