Daco Harkes
b21430a384
Reland "[vm/ffi] Remove deprecated Struct.addressOf getter"
...
This got deprecated in Dart 2.12 stable. Removing for the next release.
Closes: https://github.com/dart-lang/sdk/issues/40667
This reverts commit 1d1f68fd6d .
Change-Id: I1df84f2225ea68c2d8ccb7d3e6359050e8802f62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188291
Reviewed-by: Zach Anderson <zra@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-03-01 19:20:30 +00:00
Zach Anderson
1d1f68fd6d
Revert "[vm/ffi] Remove deprecated Struct.addressOf getter"
...
This reverts commit 65fab2397b .
Reason for revert: These can't be remove until the next dev roll of Flutter. See https://github.com/flutter/flutter/issues/76129 .
Original change's description:
> [vm/ffi] Remove deprecated `Struct.addressOf` getter
>
> This got deprecated in Dart 2.12 stable. Removing for the next release.
>
> Closes: https://github.com/dart-lang/sdk/issues/40667
>
> Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463
> Reviewed-by: Clement Skau <cskau@google.com >
> Commit-Queue: Daco Harkes <dacoharkes@google.com >
Change-Id: I94c22a206f3668ddb72d284afdc3b048d8b11aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/185500
Commit-Queue: Zach Anderson <zra@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Daco Harkes <dacoharkes@google.com >
2021-02-17 21:47:42 +00:00
Daco Harkes
65fab2397b
[vm/ffi] Remove deprecated Struct.addressOf getter
...
This got deprecated in Dart 2.12 stable. Removing for the next release.
Closes: https://github.com/dart-lang/sdk/issues/40667
Change-Id: Ifdbcf76178be6fca8603d478d629b6b6655b7123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184463
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-02-12 09:16:02 +00:00
Daco Harkes
f358afca9e
[vm/ffi] Migrate package:ffi Utf8 and Utf16 uses
...
Change-Id: I41d79969881015266273a3ce566ee402df11791d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184481
Reviewed-by: Clement Skau <cskau@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-02-11 13:13:32 +00:00
Daco Harkes
a45276ab91
Reland "[vm/ffi] Roll package:ffi to Allocator and Opaque"
...
This can only be landed when `Allocator`, `Opaque`, and `AllocatorAlloc`
have rolled into Flutter/engine, that into Flutter/flutter, and into g3.
Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.
Bug: https://github.com/dart-lang/sdk/issues/44622
Bug: https://github.com/dart-lang/sdk/issues/43974
Bug: https://github.com/dart-lang/sdk/issues/44621
Bug: https://github.com/dart-lang/sdk/issues/38721
Change-Id: I486034b379b5a63cad4aefd503ccd0f2ce5dd45e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180188
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-02-10 10:19:28 +00:00
Daco Harkes
7fbbe4fca3
[vm/ffi] Migrate off .addressOf in tests
...
Removes invocations of `.addressOf` in tests.
Removes the constructor from the Coordinate testing class which
has become useless with no access to the underlying pointer.
Removes the bare variant of Coordinate because it is identical to the
non-bare variant.
Issue: https://github.com/dart-lang/sdk/issues/40667
Change-Id: Ie26fa3a9cac38e794e93f5fadfec2562a814c1ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/181403
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-01-28 21:40:15 +00:00
Daco Harkes
3cfcc5a8e5
Revert "[vm/ffi] Roll package:ffi to Allocator and Opaque"
...
Revert submission 177862
Reason for revert: breaks g3 without https://github.com/flutter/engine/pull/23808
Reverted Changes:
I50b3b4c31:[vm/ffi] Roll `package:ffi` to `Allocator` and `Op...
I3f5b08c08:[vm/ffi] Change `Pointer<T extends Struct>.ref` to...
I6141c193b:[vm/ffi] Disallow empty structs
Change-Id: I128e7b096faea650e0ba0850a411eed3e97c00e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/180185
Reviewed-by: Daco Harkes <dacoharkes@google.com >
2021-01-20 21:37:11 +00:00
Daco Harkes
7d648e3ae7
[vm/ffi] Roll package:ffi to Allocator and Opaque
...
This can only be landed when `Allocator` and `Opaque` have rolled into
Flutter/engine, that into Flutter/flutter, and that into g3.
flutter/flutter/commit/a706cd211240f27be3b61f06d70f958c7a4156fe
Deletes all the copies of `_CallocAllocator` and uses the one from
`package:ffi` instead.
Issue: https://github.com/dart-lang/sdk/issues/44622
Issue: https://github.com/dart-lang/sdk/issues/43974
Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721
Change-Id: I50b3b4c31a2b839b35e3e057bd54f463b90bc55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179540
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-01-20 18:08:25 +00:00
Daco Harkes
0bfbdfad78
[vm/ffi] Migrate tests/ffi(_2) to CallocAllocator
...
This CL does not yet roll `package:ffi` to use `Allocator`, because that
breaks the checked in Dart in Flutter in g3. Instead, this uses the copy
of `_CallocAllocator` from `package:ffi` in `calloc.dart`.
New API landed in: https://dart-review.googlesource.com/c/sdk/+/177705
Issue: https://github.com/dart-lang/sdk/issues/44621
Issue: https://github.com/dart-lang/sdk/issues/38721
Change-Id: I10e53a363cd87c4c11e7042989e6957b82ae2a09
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178992
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2021-01-14 12:36:27 +00:00
Daco Harkes
5f68b0bba6
[test/ffi] Test struct workaround for external fields
...
Make sure the individual getter/setter workaround for structs in NNBD
works. That way structs can be migrated without having to opt in to
the proposed --enable-experiment=external-abstract-variables for
external fields.
Note that this requires dart:ffi users to migrate twice for NNBD, once
to the workaround, and later a cleanup to external fields.
Change-Id: I2a9020ff7df3ebf08e04f71183f9297d87acb1b1
Cq-Include-Trybots:dart/try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153777
Reviewed-by: Erik Ernst <eernst@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2020-07-09 15:09:21 +00:00