/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include namespace JS::Bytecode { void Instruction::destroy(Instruction& instruction) { #define __BYTECODE_OP(op) \ case Type::op: \ static_cast(instruction).~op(); \ return; switch (instruction.type()) { ENUMERATE_BYTECODE_OPS(__BYTECODE_OP) default: VERIFY_NOT_REACHED(); } #undef __BYTECODE_OP } }