-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cfe/ffi] Refactor
dart:ffi
transformations
Introduces the `NativeTypeCfe` type hierarchy for cleaner calculation of sizes and offsets of native types and cleaner code generation. The transformation ensures we're only visiting the structs in topological order, which means the struct type can always look up its (indirectly) nested structs in the `structCache`. This simplifies adding inline arrays (https://dart-review.googlesource.com/c/sdk/+/183640), packed structs, and unions to this transformation. `typedDataBaseOffset` is moved to the `FfiTransformer` because the dependent CL uses it in the `FfiUseSiteTransformer`. Bug: #35763 Bug: #38158 Bug: #38491 TEST=tests/ffi(_2)/(.*)by_value(.*)_test.dart Change-Id: I345e02c48844ca795f9137a5addd5ba89992e1c9 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184421 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Clement Skau <cskau@google.com> Commit-Queue: Daco Harkes <dacoharkes@google.com>
- Loading branch information
Showing
3 changed files
with
435 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.