You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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() to BinaryenAddGlobal() 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:
I call the BinaryenModuleValidate() to validate the generated module which uses the tuple feature. It reports error like: unexpected false: Tuples are not allowed unless multivalue is enabled, on Fatal: DWARF + multivalue is not yet complet
How should I fix this error?
The first is fixed by enabling multivalue, see BinaryenModuleSetFeatures().
For the second, you can either remove DWARF with --strip-dwarf as part of the wasm-opt invocation, or you can use a newer Binaryen as we did actually fix that recently (last few weeks - not in a release yet, but in main).
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: