message: refactor: use Stack class for control stack in parser
diff: #include "instructions.hpp"
  #include "module.hpp"
  #include "parser.hpp"
  +#include "stack.hpp"
  #include <cassert>
  -#include <stack>
  namespace fizzy
  {
  @@ -121,13 +121,13 @@ parser_result<Code> parse_expr(
  // The stack of control frames allowing to distinguish between block/if/else and label
  // instructions as defined in Wasm Validation Algorithm.
  // For a block/if/else instruction the value is the block/if/else's immediate offset.
  - std::stack<ControlFrame> control_stack;
  + Stack<ControlFrame> control_stack;
  const auto func_type_idx = module.funcsec[func_idx];
  assert(func_type_idx < module.typesec.size());
  const auto function_arity = static_cast<uint8_t>(module.typesec[func_type_idx].outputs.size());
  // The function's implicit block.
  - control_stack.emplace(Instr::block, function_arity, 0);
  + control_stack.push({Instr::block, function_arity, 0});
  const auto metrics_table = get_instruction_metrics_table();
  @@ -320,7 +320,7 @@ parser_result<Code> parse_expr(
  code.immediates.push_back(arity);
  // Push label with immediates offset after arity.
  - control_stack.emplace(Instr::block, arity, frame.stack_height, code.immediates.size());
  + control_stack.push({Instr::block, arity, frame.stack_height, code.immediates.size()});
  // Placeholders for immediate values, filled at the matching end instruction.
  push(code.immediates, uint32_t{0}); // Diff to the end instruction.
  @@ -333,7 +333,7 @@ parser_result<Code> parse_expr(
  uint8_t arity;
  std::tie(arity, pos) = parse_blocktype(pos, end);
  - control_stack.emplace(Instr::loop, arity, frame.stack_height);
  + control_stack.push({Instr::loop, arity, frame.stack_height});
  break;
  }
  @@ -343,7 +343,7 @@ parser_result<Code> parse_expr(
  std::tie(arity, pos) = parse_blocktype(pos, end);
  code.immediates.push_back(arity);
  - control_stack.emplace(Instr::if_, arity, frame.stack_height, code.immediates.size());
  + control_stack.push({Instr::if_, arity, frame.stack_height, code.immediates.size()});
  // Placeholders for immediate values, filled at the matching end and else instructions.
  push(code.immediates, uint32_t{0}); // Diff to the end instruction.
  