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));