From fc82ca1a97ce8304bf563ca53187227e505eb54e Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sun, 14 Jul 2019 18:08:42 +0200 Subject: jit: remove unnessary files from dolphin --- src/dolphin/CodeBlock.h | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'src/dolphin/CodeBlock.h') diff --git a/src/dolphin/CodeBlock.h b/src/dolphin/CodeBlock.h index 1434297..31a8d93 100644 --- a/src/dolphin/CodeBlock.h +++ b/src/dolphin/CodeBlock.h @@ -49,15 +49,6 @@ public: CodeBlock(CodeBlock&&) = delete; CodeBlock& operator=(CodeBlock&&) = delete; - // Call this before you generate any code. - void AllocCodeSpace(size_t size) - { - region_size = size; - total_region_size = size; - region = static_cast(Common::AllocateExecutableMemory(total_region_size)); - T::SetCodePtr(region); - } - // Always clear code space with breakpoints, so that if someone accidentally executes // uninitialized, it just breaks into the debugger. void ClearCodeSpace() @@ -66,26 +57,8 @@ public: ResetCodePtr(); } - // Call this when shutting down. Don't rely on the destructor, even though it'll do the job. - void FreeCodeSpace() - { - ASSERT(!m_is_child); - Common::FreeMemoryPages(region, total_region_size); - region = nullptr; - region_size = 0; - total_region_size = 0; - for (CodeBlock* child : m_children) - { - child->region = nullptr; - child->region_size = 0; - child->total_region_size = 0; - } - } - bool IsInSpace(const u8* ptr) const { return ptr >= region && ptr < (region + region_size); } - // Cannot currently be undone. Will write protect the entire code region. - // Start over if you need to change the code (call FreeCodeSpace(), AllocCodeSpace()). - void WriteProtect() { Common::WriteProtectMemory(region, region_size, true); } + void ResetCodePtr() { T::SetCodePtr(region); } size_t GetSpaceLeft() const { -- cgit v1.2.3