/* * Copyright (c) 2021, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include namespace JS::Bytecode { NonnullOwnPtr Block::create() { return adopt_own(*new Block); } Block::Block() { } Block::~Block() { } void Block::append(Badge, NonnullOwnPtr instruction) { m_instructions.append(move(instruction)); } void Block::dump() const { for (size_t i = 0; i < m_instructions.size(); ++i) { warnln("[{:3}] {}", i, m_instructions[i].to_string()); } } }