Skip to content
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

[interpreter] Proper fix for JS conversion #1832

Merged
merged 4 commits into from
Oct 8, 2024
Merged

Conversation

rossberg
Copy link
Member

@rossberg rossberg commented Oct 8, 2024

This reverts #1829 and implements a simpler & correcter fix.

@backes
Copy link
Member

backes commented Oct 8, 2024

This makes most tests pass, thanks!

There are still other issues, but that's probably unrelated. E.g. in the generated type-rec.js:

223 // type-rec.wast:69
224 let $$3 = module("\x00 [...] \x0b");
225 let M = $$3;
226
227 // type-rec.wast:69
228 let $3 = instance(M);
229 let M = $3;

(double definition of M)

@backes
Copy link
Member

backes commented Oct 8, 2024

At some point someone should just run all tests in wasm-3.0 against a JS engine and fix all those issues. I can't fix anything in the OCaml code, so I am not the right person for this. Maybe @sbc100 is already doing that as part of #1828.

@rossberg
Copy link
Member Author

rossberg commented Oct 8, 2024

Ah, just fixed that as well, can you try now? (Sorry I can test this on my end, as I am travelling.)

@backes
Copy link
Member

backes commented Oct 8, 2024

No problem, I can try and report back.

We now have a similar problem with

243 // type-rec.wast:80
244 assert_unlinkable(instance($$5));

This should be assert_unlinkable(module($$5)).

@rossberg
Copy link
Member Author

rossberg commented Oct 8, 2024

Ah, sorry, next try. :) (It should actually just be assert_unlinkable($$5), I think.)

@backes
Copy link
Member

backes commented Oct 8, 2024

After removing the unused of_instance it works, I only get two exnref-related failures which we can look into separately.

Let's land this, and then merge the updated wasm-3.0 branch into js-promise-integration and memory64.

@rossberg rossberg merged commit 29b1fd4 into wasm-3.0 Oct 8, 2024
@rossberg rossberg deleted the fix-of_module2 branch October 8, 2024 13:41
@rossberg
Copy link
Member Author

rossberg commented Oct 8, 2024

Landed. Thanks for your patience. :)

@backes
Copy link
Member

backes commented Oct 8, 2024

Thanks for fixing this!

I created PRs to merge the new wasm-3.0 branch into memory64 and jspi (I hope this is how this works):
WebAssembly/memory64#89
WebAssembly/js-promise-integration#50

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.

2 participants