WebAssembly / gc

Branch of the spec repo scoped to discussion of GC integration in WebAssembly
https://webassembly.github.io/gc/
Other
982 stars 70 forks source link

Add additional `i31ref` spec tests #534

Closed fitzgen closed 4 months ago

fitzgen commented 5 months ago

I noticed that Wasmtime was passing the spec tests despite having bits that were known to be unimplemented. This should help the tests exercise those corners of the spec.

Notably:

@rossberg PTAL

fitzgen commented 5 months ago

Should we also have non-nullable variants of these tests?

There are a couple non-null types in there. Indeed, we avoid generating null-checks for GC barriers when we have non-null types. I think in an ideal world, yes, we would duplicate ~everything once for nullable and once more for non-nullable types. Don't really want to do that by hand though. Maybe if we were generating tests programmatically.

One nit: Can you match the folded style of the rest of this test?

Done!

fitzgen commented 4 months ago

(I don't have write access and can't merge this PR myself)

fitzgen commented 4 months ago

Thanks!