mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- moved argsCache out of JitCompiler::CreateFuncSignature
This commit is contained in:
parent
8277de8626
commit
60a35e0bb3
1 changed files with 2 additions and 1 deletions
|
@ -543,6 +543,8 @@ void JitCompiler::EmitNativeCall(VMNativeFunction *target)
|
|||
ParamOpcodes.Clear();
|
||||
}
|
||||
|
||||
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
||||
|
||||
asmjit::FuncSignature JitCompiler::CreateFuncSignature()
|
||||
{
|
||||
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.
|
||||
static std::map<FString, std::unique_ptr<TArray<uint8_t>>> argsCache;
|
||||
std::unique_ptr<TArray<uint8_t>> &cachedArgs = argsCache[key];
|
||||
if (!cachedArgs) cachedArgs.reset(new TArray<uint8_t>(args));
|
||||
|
||||
|
|
Loading…
Reference in a new issue