Reading over #1600 I remembered that I have a difficult time understanding how value types are encoded in wasm. There's a number of overlapping concerns and a bit of duplication within wasmparser itself. I've tried to leave an explanatory comment for myself in the future which can also hopefully help serve others as well.
Along the way I've also managed to remove ValType::is_valtype_byte with some simpler logic to avoid duplication of all the value type bytes that are supported.
Reading over #1600 I remembered that I have a difficult time understanding how value types are encoded in wasm. There's a number of overlapping concerns and a bit of duplication within
wasmparser
itself. I've tried to leave an explanatory comment for myself in the future which can also hopefully help serve others as well.Along the way I've also managed to remove
ValType::is_valtype_byte
with some simpler logic to avoid duplication of all the value type bytes that are supported.