-
Notifications
You must be signed in to change notification settings - Fork 717
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
[Question] Multi-value Return using Tuple #6569
Comments
Q1-Q3: Yes. Types are handles to types, so you can pass them around like that. Q4: |
Hi, Thanks for your reply. I call the |
The first is fixed by enabling multivalue, see For the second, you can either remove DWARF with |
I am building a project using C API. I have some questions regarding the multi-value return.
Suppose I want to construct a function with ( i32 i32 i32) as return values.
Q1: How should I define the type for both the call expression and return type of the function itself? Should I use
BinaryenTypeCreate()
to construct the type for both?Q2: If I want to set the tuple as a local variable, should I reuse the type from
BinaryenTypeCreate()
?Q3: If I want to set the tuple as a global variable, should I pass the result from
BinaryenTypeCreate()
toBinaryenAddGlobal()
as the type?Q3: I am modifying an existing function, is there any API I can use to add an extra local variable or modify the type of an existing local variable?
The text was updated successfully, but these errors were encountered: