| 336 | // ── Parametric instructions ─────────────────────────────────────────────────── |
| 337 | |
| 338 | WasmInstr ParseContext::parse_parametricinstr(const std::string& name) { |
| 339 | if (name == "drop") return Instr::Drop(); |
| 340 | // select result* |
| 341 | Instr::Select instr; |
| 342 | while (tok_.peek().type == TokenType::LParen && |
| 343 | tok_.peek2().type == TokenType::Keyword && tok_.peek2().text == "result") { |
| 344 | auto results = parse_result(); |
| 345 | instr.valtypes.insert(instr.valtypes.end(), results.begin(), results.end()); |
| 346 | } |
| 347 | return instr; |
| 348 | } |
| 349 | |
| 350 | // ── Variable instructions ───────────────────────────────────────────────────── |
| 351 | |