wasm-tools icon indicating copy to clipboard operation
wasm-tools copied to clipboard

wast: Ordering of instructions is a bit disordered

Open eqrion opened this issue 5 years ago • 1 comments

wast::Instruction [1] lists all instructions that can be parsed by WebAssembly. Currently it is neither sorted by name, encoding, or proposal. This makes it a bit hard to find where an instruction is, and I'd be happy to open a PR to sort it in some way.

@alexcrichton What do you think about sorting by proposal and then sorting by encoding within proposal?

[1] https://github.com/bytecodealliance/wasm-tools/blob/e3f6090d993069c8abb15810ae82e12534cbbcc6/crates/wast/src/ast/expr.rs#L341

eqrion avatar Jul 16 '20 18:07 eqrion

Sounds reasonable to me!

alexcrichton avatar Jul 16 '20 19:07 alexcrichton