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

druntime: Define rt.aaA.AA as naked pointer, no struct wrapper #3613

Merged
merged 1 commit into from
Nov 13, 2020

Conversation

kinke
Copy link
Member

@kinke kinke commented Nov 11, 2020

To fix ABI incompatibilities between the previous struct and void* used by the hardcoded compiler prototypes, e.g., for WebAssembly, which uses the default UnknownTargetABI, which uses LLVM byval for all structs and static arrays.

@JohanEngelen
Copy link
Member

Can we come up with a testcase that would catch this?

@kinke
Copy link
Member Author

kinke commented Nov 11, 2020

~Any usage of AAs for such targets should very quickly show that something's off. A lit-test could theoretically import rt.aaA and check that AA is a pointer, but that's IMO not much of a test.

@JohanEngelen
Copy link
Member

ah yes, I was confused about the WASM case, but that errored because of a user-written runtime.

To fix ABI incompatibilities between the previous struct and `void*`
used by the hardcoded compiler prototypes, e.g., for WebAssembly, which
uses the default UnknownTargetABI, which uses LLVM byval for all structs
and static arrays.
@kinke kinke merged commit 39d3aa7 into ldc-developers:master Nov 13, 2020
@kinke kinke deleted the AA branch January 8, 2021 17:58
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