Stream: general

Topic: wasmparser: What exactly is `CallIndirect::table_byte`?


view this post on Zulip James (Jul 03 2022 at 04:38):

I noticed that there's a field in Operator::CallIndirect called table_byte. What exactly is this used for? The only mention of it I could find in wasm-tools was in validation, where if table_byte is zero and reference types are not enabled, it returns an error. Why exactly is this?

view this post on Zulip bjorn3 (Jul 03 2022 at 12:47):

table_byte seems to be the first byte of the table index when encoded as ULEB128. The table index was required to be 0 before reference types were supported by wasm.


Last updated: Dec 23 2024 at 12:05 UTC