mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 23:11:58 +00:00
- moved argsCache out of JitCompiler::CreateFuncSignature
This commit is contained in:
parent
888af3d684
commit
670d975a33
1 changed files with 2 additions and 1 deletions
|
@ -543,6 +543,8 @@ void JitCompiler::EmitNativeCall(VMNativeFunction *target)
|
||||||
ParamOpcodes.Clear();
|
ParamOpcodes.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
||||||
|
|
||||||
asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
||||||
{
|
{
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
@ -657,7 +659,6 @@ asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
||||||
}
|
}
|
||||||
|
|
||||||
// FuncSignature only keeps a pointer to its args array. Store a copy of each args array variant.
|
// FuncSignature only keeps a pointer to its args array. Store a copy of each args array variant.
|
||||||
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
|
||||||
std::unique_ptr<TArray<uint8_t>> &cachedArgs = argsCache[key];
|
std::unique_ptr<TArray<uint8_t>> &cachedArgs = argsCache[key];
|
||||||
if (!cachedArgs) cachedArgs.reset(new TArray<uint8_t>(args));
|
if (!cachedArgs) cachedArgs.reset(new TArray<uint8_t>(args));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue