40 for (
const auto& operand_type : wire_format) {
41 if (operand_type == OperandType::TAG) {
44 offset += operand_sizes.at(operand_type);
46 BB_ASSERT(
false,
"Wire format for opcode has no TAG operand");
#define BB_ASSERT(expression,...)
std::vector< uint8_t > build() const
BytecodeBuilder & add(const simulation::Instruction &instruction)
BytecodeBuilder & add_raw(std::span< const uint8_t > bytes)
std::vector< uint8_t > bytecode
const std::unordered_map< OperandType, uint32_t > & get_operand_type_sizes()
const std::unordered_map< WireOpCode, std::vector< OperandType > > & get_instruction_wire_formats()
size_t tag_byte_offset(WireOpCode opcode)
std::vector< uint8_t > encode_to_bytecode(const std::vector< Instruction > &instructions)
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept