-
Notifications
You must be signed in to change notification settings - Fork 35
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
Finish all the validation for the interpreter #440
Conversation
import com.dylibso.chicory.wasm.types.Table; | ||
import com.dylibso.chicory.wasm.types.Value; | ||
import com.dylibso.chicory.wasm.types.ValueType; | ||
|
||
public class SpecV1ElemHostFuncs { | ||
|
||
public static HostImports fallback() { | ||
return new HostImports(); | ||
return HostImports.builder() | ||
.addGlobal( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: this API is better than before, but is still too verbose and detailed for 90% of the use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, i have some words to say about this in #441
return HostImports.builder() | ||
.addFunction( | ||
new HostFunction( | ||
(Instance instance, Value... args) -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note to self: HostFunction
constructor is the only Host
constructor that doesn't take the two strings for the name as first arguments
ee2683c
to
b15ae40
Compare
I'm traveling for the next two days and can review when I return home. It will be easier to review if you can split out the API refactoring to a separate commit from the functional changes. |
Thanks for the feedback @electrum ! I might try to separate in 2 commits, but is challenging, apart from a few trivial things, the biggest part of it is driven by this change: https://github.com/dylibso/chicory/pull/440/files#diff-fadb7963eded2e2c77d87d70b45f81ab8b4ea0cffff5a68695cead4732c5f6b1R225 We had a bug in the tests generation and now the generated code looks different. |
Thanks for the reviews! Appreciated! |
I'll clean this up tomorrow, there are probably leftovers around as I was going back and forth fixing stuffs.