Skip to content

Mark #sizeOf getter as synthetic in FFI struct transformation#62755

Open
Gurleen-kansray wants to merge 2 commits intodart-lang:mainfrom
Gurleen-kansray:mark-sizeof-synthetic
Open

Mark #sizeOf getter as synthetic in FFI struct transformation#62755
Gurleen-kansray wants to merge 2 commits intodart-lang:mainfrom
Gurleen-kansray:mark-sizeof-synthetic

Conversation

@Gurleen-kansray
Copy link

@Gurleen-kansray Gurleen-kansray commented Feb 24, 2026

The #sizeOf getter generated by _addSizeOfGetter() in pkg/vm/lib/modular/transformations/ffi/definitions.dart is currently not marked as synthetic.

The corresponding #offsetOf getters in the same transformation are already marked with isSynthetic = true. For consistency, the #sizeOf getter should also be marked synthetic.

This issue was identified during GSoC 2026 exploration of the Native Memory Inspector project and suggested by Daco Harkes.

This change adds ..isSynthetic = true to the #sizeOf getter in _addSizeOfGetter().

  • I've reviewed the contributor guide and applied the relevant portions to this PR.

@copybara-service
Copy link

Thank you for your contribution! This project uses Gerrit for code reviews. Your pull request has automatically been converted into a code review at:

https://dart-review.googlesource.com/c/sdk/+/483400

Please wait for a developer to review your code review at the above link; you can speed up the review if you sign into Gerrit and manually add a reviewer that has recently worked on the relevant code. See CONTRIBUTING.md to learn how to upload changes to Gerrit directly.

Additional commits pushed to this PR will update both the PR and the corresponding Gerrit CL. After the review is complete on the CL, your reviewer will merge the CL (automatically closing this PR).

@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/483400 has been updated with the latest commits from this pull request.

Closes dart-lang#62755

GitOrigin-RevId: ef98616
Change-Id: I1c2dafd605651241101edb6b1afd04528436cc68
@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/483400 has been updated with the latest commits from this pull request.

@dcharkes
Copy link
Contributor

@Gurleen-kansray see the Gerrit CL for test failures.

@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/483400 has been updated with the latest commits from this pull request.

1 similar comment
@copybara-service
Copy link

https://dart-review.googlesource.com/c/sdk/+/483400 has been updated with the latest commits from this pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants