wabt icon indicating copy to clipboard operation
wabt copied to clipboard

Use a shared null object for all Stores.

Open zherczeg opened this issue 3 years ago • 8 comments
trafficstars

zherczeg avatar Mar 10 '22 11:03 zherczeg

What is the goal of this change? Is it an optimization or something about being able to share this object between stores?

If its an optimization then I would ask why such micro-optimizations are needed? Are you huge number of stores?

sbc100 avatar Mar 11 '22 17:03 sbc100

It is a simple optimization. If you think this is unnecessary, I can close the PR. I would like to help improving the interpreter, is there any task which is useful for you? I would focus on garbage collection and memory, but I can help with other things.

zherczeg avatar Mar 12 '22 13:03 zherczeg

It is a simple optimization. If you think this is unnecessary, I can close the PR. I would like to help improving the interpreter, is there any task which is useful for you? I would focus on garbage collection and memory, but I can help with other things.

If the optimization is to avoid the bytes needed to represent NULL in each store I do think it might be premature, yes. I imagine this is a couple of words of memory per-store? But I don't know if anyone who uses the wabt interpreter on a scale where that would matter.

If you are interested in helping out wabt in general what would be great! Let me go through the open issues and prioritize some of them and get back to you.

sbc100 avatar Mar 12 '22 14:03 sbc100

If are you interested in helping out with GC in general we could use some help workon and merging the work that @binji started in to get the GC proposal implemented: https://github.com/WebAssembly/wabt/issues/1257

sbc100 avatar Mar 13 '22 22:03 sbc100

Thank you for the suggestion. At first sight it looks like it adds a new struct / array related code. The work looks quite a big, and does a lot of different things. Is it possible to split this into well defined subtasks? I see references to draft documents. Is there a final version available somewhere?

zherczeg avatar Mar 14 '22 06:03 zherczeg

Thank you for the suggestion. At first sight it looks like it adds a new struct / array related code. The work looks quite a big, and does a lot of different things. Is it possible to split this into well defined subtasks? I see references to draft documents. Is there a final version available somewhere?

The GC proposal is still in flight but recently reached stage 2 so is less likely to have huge changes going forward.

But yes, I think it pretty large amount of work. There are certainly many smaller issues in wabt that we could have you look at.

sbc100 avatar Mar 14 '22 15:03 sbc100

I am ok working on this but I would prefer to do incremental changes rather than a huge patch, Something like introducing the support of some opcodes, and adding tests for them. I am still new here and needs to learn a lot.

This document mentions two prerequisites: https://github.com/WebAssembly/gc/blob/master/proposals/gc/MVP.md

Are these supported? If not, and not too complicated, maybe I could try to do them. But I am open to any ideas.

zherczeg avatar Mar 15 '22 20:03 zherczeg

Another useful task that could be more reasonable in size would be to update the testsuite repo (using this script: https://github.com/WebAssembly/testsuite/blob/main/update-testsuite.sh) and then update the submodule dependency in wabt, and then run ./test/update-spec-tests.py here in wabt, and fix any issues that come out of that.

That process bascially ensure that wabt stays to-to-date with any specs that it purports to support.

sbc100 avatar Mar 15 '22 20:03 sbc100

Closing as dormant (it looks like we decided not to do this).

keithw avatar Feb 13 '23 10:02 keithw