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

Add support for params passed indirectly #208

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

alexcrichton
Copy link
Member

This commit adds support for the MAX_FLAT_PARAMS variable in the
current canonical ABI draft. Argument lists which exceed a static number
of parameters are now always passed indirectly through memory. In export
this is dynamically allocated/freed and in imports this is statically
passed.

@alexcrichton
Copy link
Member Author

Note that the first commit here is #207

This commit adds support for the `MAX_FLAT_PARAMS` variable in the
current canonical ABI draft. Argument lists which exceed a static number
of parameters are now always passed indirectly through memory. In export
this is dynamically allocated/freed and in imports this is statically
passed.
Copy link
Member

@peterhuene peterhuene left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also looks good, just a few minor comments.

crates/gen-spidermonkey/src/lib.rs Outdated Show resolved Hide resolved
crates/parser/src/abi.rs Outdated Show resolved Hide resolved
crates/parser/src/abi.rs Outdated Show resolved Hide resolved
@alexcrichton alexcrichton merged commit b7ccb13 into bytecodealliance:main Apr 28, 2022
@alexcrichton alexcrichton deleted the max-params branch April 28, 2022 19:29
willemneal pushed a commit to AhaLabs/wit-bindgen that referenced this pull request May 31, 2022
* Add support for params passed indirectly

This commit adds support for the `MAX_FLAT_PARAMS` variable in the
current canonical ABI draft. Argument lists which exceed a static number
of parameters are now always passed indirectly through memory. In export
this is dynamically allocated/freed and in imports this is statically
passed.

* Review comments
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