mirror of
https://github.com/dart-lang/sdk
synced 2024-10-01 19:29:09 +00:00
[changelog/ffi] Document dart:ffi changes for D26
Change-Id: I371a9b9bac29bc75bc5b69f960da56854f515680 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122149 Commit-Queue: Daco Harkes <dacoharkes@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
9220890dc7
commit
2c1d405c15
20
CHANGELOG.md
20
CHANGELOG.md
|
@ -80,6 +80,26 @@ main() { foo(() {}); }
|
||||||
* Added optional `parent` parameter to `TimelineTask` constructor to allow for
|
* Added optional `parent` parameter to `TimelineTask` constructor to allow for
|
||||||
linking of asynchronous timeline events in the DevTools timeline view.
|
linking of asynchronous timeline events in the DevTools timeline view.
|
||||||
|
|
||||||
|
### `dart:ffi`
|
||||||
|
|
||||||
|
* **Breaking change**: The API now makes use of static extension members.
|
||||||
|
Static extension members enable the `dart:ffi` API to be more precise with
|
||||||
|
types, and provide convenient access to memory through extension getters and
|
||||||
|
setters. The extension members on `Pointer` provide `.value` and `.value =`
|
||||||
|
for accessing the value in native memory and `[]` and `[]=` for indexed access.
|
||||||
|
The method `asExternalTypedData` has been replaced with `asTypedList` extension
|
||||||
|
methods. And finally, `Structs` do no longer have a type argument and are
|
||||||
|
accessed the extension member `.ref` on `Pointer`.
|
||||||
|
These changes makes the code using `dart:ffi` much more concise.
|
||||||
|
* **Breaking change**: The memory management has been removed (`Pointer.allocate`
|
||||||
|
and `Pointer.free`). Instead, memory management is available in
|
||||||
|
[package:ffi](https://pub.dev/packages/ffi).
|
||||||
|
* **Breaking change**: `Pointer.offsetBy` was removed, use `cast` and `elementAt`
|
||||||
|
instead.
|
||||||
|
* Faster memory load and stores.
|
||||||
|
* The dartanalyzer (commandline and IDEs) now reports `dart:ffi` static errors.
|
||||||
|
* Callbacks are now supported in AOT (ahead-of-time).
|
||||||
|
|
||||||
### Dart VM
|
### Dart VM
|
||||||
|
|
||||||
* Added a new tool for AOT compiling Dart programs to native, self-contained
|
* Added a new tool for AOT compiling Dart programs to native, self-contained
|
||||||
|
|
Loading…
Reference in a new issue