spec icon indicating copy to clipboard operation
spec copied to clipboard

[interpreter] Support nested invoke/get in test scripts

Open rossberg opened this issue 2 years ago • 3 comments

Also adds set action to mutate globals. See script.wast for examples.

@titzer, PTAL. Should fix #1568.

This was straightforward to implement, except for the JS conversion, which caused quite some headache because wrapper modules generated for actions on types inexpressible in JS are no longer closed now but need to take their arguments as imports. This is largely untested.

rossberg avatar Feb 08 '23 15:02 rossberg

Okay, JS conversion is completely broken right now. To support multiple imports in Wasm wrappers, the implementation needs a complete refactor. I'll look into it, but might no find time for a little while.

rossberg avatar Feb 09 '23 13:02 rossberg

I did a rewrite of most of the JS converter and it now can handle wrapper modules with an arbitrary number of imports. It also made the code more readable.

rossberg avatar Feb 10 '23 07:02 rossberg

@titzer, are you content with this? If so, can you approve the PR?

rossberg avatar Feb 16 '23 10:02 rossberg