Skip to content

Simplify function call interface #48

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

Merged
merged 1 commit into from
Oct 11, 2018
Merged

Simplify function call interface #48

merged 1 commit into from
Oct 11, 2018

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Oct 10, 2018

  • Pass arguments and results via plain arrays (sizes determined from function type).
  • Abolish Return/wasm_return_t type, pass trap as return value from calls.
  • Add Func::param_arity and Func::result_arity methods.
  • Also pass instance imports via plain array (size determined from module type).
  • Adapt examples.

The upshot of these changes is that no value vectors need to be allocated anymore during calls.

* Pass arguments and results via plain arrays (sizes determined from function type).
* Abolish Return/wasm_return_t type.
* Pass instance imports via plain array (size determined from module type).
@rossberg
Copy link
Member Author

@lostman, this is a simplification to the interface of callbacks and wasm_func_call. I'd like to land this ASAP, but let me know if you have concerns.

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.

1 participant