[vm/ffi] Allocate Array
with TypedData
#54512
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-ffi
P3
A lower priority bug or feature request
triaged
Issue has been triaged by sub team
type-enhancement
A request for a change that isn't a bug
Uh oh!
There was an error while loading. Please reload this page.
In [vm/ffi]
TypedData
constructors forStruct
andUnion
addressing #45697, structs and unions can are automatically backed by a typed data on the default constructor.We should consider doing similar for fixed-size arrays.
Things to consider:
Array
constructor for annotations.API sketch:
If we could somehow distinguish annotation call sites from normal code, we could possibly reuse the existing constructor:
cc @mkustermann
Workaround for compile-time length arrays
After https://dart-review.googlesource.com/c/sdk/+/342763 lands.
Define a wrapper struct, allocate that as typed data, and read the array out:
The text was updated successfully, but these errors were encountered: