Repository navigation
wasm2c: restore older versions of some spec tests - #1853
Conversation
|
In general I like the idea of have more test coverage. The fact that you have to modify these tests makes me a little sad. Could we perhaps fix the code to support the old tests without modifying them? Or would that end up moving the code backwards in some way? How far are we from supporting bulk-memory and reference-types and thus not needing this PR? Could you make it clear in the README.txt that these files should be delete as soon as we do support support bulk-memory and reference-types. Perhaps with a link to |
I'm guessing it would be pretty doable since wast2json and wasm2c passed these tests in the pass. Let me take a look.
We've started working on this because of our own needs (you can see WIP at https://github.com/fixpointOS/wabt/tree/bulk-memory), but if possible I'd rather not have to implement these features once for the un-instanced code and then rebase/reimplement for instanced modules (or vice versa). So if it were up to us and based on your comment in #1833, the sequence would go:
Thoughts?
Sure. |
|
That order of work sounds right to me! Thanks again for working on this. |
c28a111 to
095e2f2
Compare
Test wasm2c against versions of the spec tests from before bulk-memory and reference-types were merged (as of commit a8bcbaf in the testsuite repo). These should be replaced with the current versions once wasm2c supports bulk-memory and reference-types.
095e2f2 to
c687fe2
Compare
|
Here you go -- the changes necessary to get the old tests passing unmodified were pretty small. I was a little nervous removing the short-circuit here (https://github.com/WebAssembly/wabt/blob/main/src/c-writer.cc#L1029-L1033) that was recently added in 1c8efb3, but, it doesn't seem to add a warning or other breakage when I take this out. Re: the comment there, even if a module has no types, the table can still be exported (which is what the failing test seemed to hit). |
sbc100
left a comment
There was a problem hiding this comment.
Thanks! LGTM. Can you explain why you needed those changes under src?
Test wasm2c against versions of the "missing" spec tests (tracked at #1737) from before the bulk-memory and reference-types proposals were merged (as of commit WebAssembly/testsuite@a8bcbaf). It seems helpful to make sure these tests don't break through various refactors (including our #1814 which doesn't currently pass all of these). These can be replaced with the current versions of the tests once wasm2c supports bulk-memory and reference-types.
I had to make two changes to get these tests to pass today:1. https://github.com/WebAssembly/testsuite/blob/a8bcbafe6d2fb191ce0188de0e18fdc107fa2598/elem.wast#L15-L18 (removed duplicate $t ids or else wast2json errors)2. https://github.com/WebAssembly/testsuite/blob/a8bcbafe6d2fb191ce0188de0e18fdc107fa2598/exports.wast#L119-L137 (removed table export section or else wasm2c triggers an assertion failure)