[ffi] Add missing changelog entries for dart:ffi

Includes changelog additions and `@Since` version fixes for https://dart-review.googlesource.com/c/sdk/+/349260.

CoreLibraryReviewExempt: No functional change and dart:ffi is only supported by the VM and dart2wasm.
Change-Id: Iad0c4d3686278312715ec5fc5374b3c983b71d1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349765
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This commit is contained in:
Parker Lougheed 2024-02-05 16:28:04 +00:00 committed by Commit Queue
parent f3740c96e8
commit 0a0f6915ca
3 changed files with 21 additions and 4 deletions

View file

@ -23,6 +23,11 @@
### Libraries
#### `dart:ffi`
- Added `Struct.create` and `Union.create` to create struct and union views
of the sequence of bytes stored in a subtype of `TypedData`.
#### `dart:js_interop`
- On dart2wasm, `JSBoxedDartObject` now is an actual JS object that wraps the
@ -97,6 +102,11 @@
- In addition to functions, `@Native` can now be used on fields.
- Allow taking the address of native functions and fields via
`Native.addressOf`.
- The `elementAt` pointer arithmetic extension methods on
core `Pointer` types are now deprecated.
Migrate to the new `-` and `+` operators instead.
- The experimental and deprecated `@FfiNative` annotation has been removed.
Usages should be updated to use the `@Native` annotation.
#### `dart:js_interop`
@ -380,6 +390,8 @@ constraint][language version] lower bound to 3.2 or greater (`sdk: '^3.2.0'`).
error if is called after the `NativeCallable` has already been `close`d. Calls
to `close` after the first are now ignored.
[#53311]: https://github.com/dart-lang/sdk/issues/53311
#### `dart:io`
- **Breaking change** [#53005][]: The headers returned by
@ -1123,6 +1135,11 @@ constraint][language version] lower bound to 3.0 or greater (`sdk: '^3.0.0'`).
[`Counter`]: https://api.dart.dev/stable/2.18.2/dart-developer/Counter-class.html
[`Gauge`]: https://api.dart.dev/stable/2.18.2/dart-developer/Gauge-class.html
#### `dart:ffi`
- The experimental `@FfiNative` annotation is now deprecated.
Usages should be replaced with the new `@Native` annotation.
#### `dart:html`
- **Breaking change**: As previously announced, the deprecated `registerElement`

View file

@ -112,7 +112,7 @@ abstract base class Struct extends _Compound {
/// bytes for the [sizeOf] of the created struct, is allocated on the Dart
/// heap, and used as memory to store the struct fields.
///
/// If [offset] is provded, the indexing into [typedData] is offset by
/// If [offset] is provided, the indexing into [typedData] is offset by
/// [offset] times [TypedData.elementSizeInBytes].
///
/// Example:
@ -141,7 +141,7 @@ abstract base class Struct extends _Compound {
/// ```
///
/// To create a struct object from a [Pointer], use [StructPointer.ref].
@Since('3.3')
@Since('3.4')
external static T create<T extends Struct>([TypedData typedData, int offset]);
/// Creates a view on a [TypedData] or [Pointer].

View file

@ -77,7 +77,7 @@ abstract base class Union extends _Compound {
/// bytes for the [sizeOf] of the created union, is allocated on the Dart
/// heap, and used as memory to store the union fields.
///
/// If [offset] is provded, the indexing into [typedData] is offset by
/// If [offset] is provided, the indexing into [typedData] is offset by
/// [offset] times [TypedData.elementSizeInBytes].
///
/// Example:
@ -110,7 +110,7 @@ abstract base class Union extends _Compound {
/// ```
///
/// To create a union object from a [Pointer], use [UnionPointer.ref].
@Since('3.3')
@Since('3.4')
external static T create<T extends Union>([TypedData typedData, int offset]);
/// Creates a view on a [TypedData] or [Pointer].