Skip to content

Conversation

@jwharm
Copy link
Owner

@jwharm jwharm commented Jul 20, 2025

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.

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.
@jwharm jwharm merged commit be2f530 into main Jul 20, 2025
@jwharm jwharm deleted the fix-memory-layout branch July 20, 2025 20:23
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