Fix memory layout generation for struct parameters #251
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi!251
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-memory-layout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When a struct is passed by value to a native function, we have to set the struct's memory layout in the FunctionDescriptor, not ValueLayout.ADDRESS.
This means we can't use simple strings ("ADDRESS", "JAVA_INT" etc.) to represent the memory layout anymore, because we need to include things like "typeName:T.getMemoryLayout()". So the relevant functions have been changed everywhere to use PartialStatements that maintain the relevant type information.