From 670d975a337242049808eae7e17684c174769d89 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sat, 8 Dec 2018 23:31:55 +0100 Subject: [PATCH] - moved argsCache out of JitCompiler::CreateFuncSignature --- src/scripting/vm/jit_call.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scripting/vm/jit_call.cpp b/src/scripting/vm/jit_call.cpp index f51fd1c39..137203017 100644 --- a/src/scripting/vm/jit_call.cpp +++ b/src/scripting/vm/jit_call.cpp @@ -543,6 +543,8 @@ void JitCompiler::EmitNativeCall(VMNativeFunction *target) ParamOpcodes.Clear(); } +static std::map>> 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>> argsCache; std::unique_ptr> &cachedArgs = argsCache[key]; if (!cachedArgs) cachedArgs.reset(new TArray(args));