wasm_decode_gc (wasm v0.1.0)
View SourceThe 0xFB opcode space: garbage collection.
Structs, arrays, i31 and the casts. Add a GC instruction here rather than in
wasm_decode_code. Split out of wasm_decode_code for the
same reason the vector opcodes were: it is a proposal's worth of instructions
and inlining it would bury the rules around it.
Only a few immediate shapes appear:
| shape | instructions |
|---|---|
| type index | struct.new, array.new, array.len and most others |
| type index and field index | the struct.get family and struct.set |
| type index and data or element index | array.new_data, array.init_elem |
| heap type | ref.test, ref.cast, in nullable and non-nullable forms |
| flags, label and two heap types | br_on_cast, br_on_cast_fail |