Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[vm/ffi] Support alignment attributes in struct fields #43257

Open
dcharkes opened this issue Aug 31, 2020 · 0 comments
Open

[vm/ffi] Support alignment attributes in struct fields #43257

dcharkes opened this issue Aug 31, 2020 · 0 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi

Comments

@dcharkes
Copy link
Contributor

We should consider supporting __attribute__((aligned (16))) in dart:ffi. (Cousin to supporting the attribute packed #38158.)

class A extends Struct {
  Pointer<Int> a;

  @AlignedTo(8)
  Int8()
  int b; // aligned to 8 both on 32 bit and 64 bit.
}

This would enable platform independent bitfields in structs: dart-lang/native#406. (Related issue #38954.)

@dcharkes dcharkes added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi labels Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. library-ffi
Projects
None yet
Development

No branches or pull requests

1 participant