assemblyscript
assemblyscript copied to clipboard
Can the `cookie` parameter of `__visit` be removed?
I'm reimplementing the incremental runtime of AssemblyScript in C.
And I found that some visiting functions(__visit visitRoots visitStack) of GC all have cookie parameters, but they are only passed without using it.
So what is the function of cookie parameter?
Can I remove it?
The cookie parameter has remained from previous implementations, where multiple operations during visiting were possible (increment / decrement reference count). Hasn't been removed in anticipation of potential future cases where, besides marking, other operations could be useful. Probably doesn't matter much once Wasm GC becomes a thing.