WebAssembly / gc

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

Fix context for table initialisers #434

Closed rossberg closed 1 year ago

rossberg commented 1 year ago

Fix #433.

rossberg commented 1 year ago

Yes, absolutely. And for that to work cleanly in the future, we must not mess up the dependency order now.

I'd love to do the relaxation of section order and repetition sooner rather than later, but despite many weak use cases, we are still missing a strong one, it seems.

eqrion commented 1 year ago

Yes, absolutely. And for that to work cleanly in the future, we must not mess up the dependency order now.

I'd love to do the relaxation of section order and repetition sooner rather than later, but despite many weak use cases, we are still missing a strong one, it seems.

Yeah, I was wondering if we should prototype this in SM at some point. Glancing at it though, it would require a lot of reworking and auditing of our validation/instantiation code. So it definitely needs a good motivation. That being said, if the relaxation is just a couple specific sections, that could keep the total permutations low enough to be easy.

titzer commented 1 year ago

Also, should it be legal to use an imported global? Imports occur before tables and thus add to the global index space, so it seems to me like this should be legal.

rossberg commented 1 year ago

@titzer, that is legal, but it seems we were missing a test for that. PTAL at WebAssembly/function-references#106