webassemblyjs
webassemblyjs copied to clipboard
AST format: Make all types passed via instruction names node attributes
Another AST format change proposal. Conversion and memory instructions carry a type in their name (store8, reinterpret/i32, etc). We currently just store the instruction name and whatever package that requires this information has to extract it from the string (we some instances of switch statements based on instruction where this leads to inconsistent code). My suggestion would be to store the information directly in the node as attribute since it is more than just a name imo.