JitCache: Get rid of reliance on the JIT global variable

This commit is contained in:
Lioncash committed 2017-01-09 04:43:06 -05:00
1 parent f75aab1a85
commit 37d10064b8
11 files changed
+45 -13

No files matched your search

@@ -59,7 +59,7 @@ private:
const u8* GetCodePtr() { return (u8*)(m_code.data() + m_code.size()); }
void ExecuteOneBlock();
BlockCache m_block_cache;
BlockCache m_block_cache{*this};
std::vector<Instruction> m_code;
PPCAnalyst::CodeBuffer code_buffer;
};
@@ -3,8 +3,11 @@
// Refer to the license.txt file included.
#include "Core/PowerPC/CachedInterpreter/InterpreterBlockCache.h"
#include "Core/PowerPC/JitCommon/JitBase.h"
BlockCache::BlockCache() = default;
BlockCache::BlockCache(JitBase& jit) : JitBaseBlockCache{jit}
{
}
void BlockCache::WriteLinkBlock(const JitBlock::LinkData& source, const JitBlock* dest)
{
@@ -6,10 +6,12 @@
#include "Core/PowerPC/JitCommon/JitCache.h"
class JitBase;
class BlockCache final : public JitBaseBlockCache
{
public:
BlockCache();
explicit BlockCache(JitBase& jit);
private:
void WriteLinkBlock(const JitBlock::LinkData& source, const JitBlock* dest) override;