diff --git a/src/frontend/ir/basic_block.cpp b/src/frontend/ir/basic_block.cpp index 998f7a3e..086d672d 100644 --- a/src/frontend/ir/basic_block.cpp +++ b/src/frontend/ir/basic_block.cpp @@ -20,6 +20,16 @@ namespace Dynarmic::IR { +Block::Block(const LocationDescriptor& location) + : location{location}, end_location{location}, + instruction_alloc_pool{std::make_unique(sizeof(Inst), 4096)} {} + +Block::~Block() = default; + +Block::Block(Block&&) = default; + +Block& Block::operator=(Block&&) = default; + void Block::AppendNewInst(Opcode opcode, std::initializer_list args) { PrependNewInst(end(), opcode, args); } diff --git a/src/frontend/ir/basic_block.h b/src/frontend/ir/basic_block.h index d28bcb25..eb27fd4d 100644 --- a/src/frontend/ir/basic_block.h +++ b/src/frontend/ir/basic_block.h @@ -39,8 +39,14 @@ public: using reverse_iterator = InstructionList::reverse_iterator; using const_reverse_iterator = InstructionList::const_reverse_iterator; - explicit Block(const LocationDescriptor& location) - : location(location), end_location(location) {} + explicit Block(const LocationDescriptor& location); + ~Block(); + + Block(const Block&) = delete; + Block& operator=(const Block&) = delete; + + Block(Block&&); + Block& operator=(Block&&); bool empty() const { return instructions.empty(); } size_type size() const { return instructions.size(); } @@ -145,7 +151,7 @@ private: /// List of instructions in this block. InstructionList instructions; /// Memory pool for instruction list - std::unique_ptr instruction_alloc_pool = std::make_unique(sizeof(Inst), 4096); + std::unique_ptr instruction_alloc_pool; /// Terminal instruction of this block. Terminal terminal = Term::Invalid{};