From fad8c9c7b494b27c26b64d218ed3c149375c0e98 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Thu, 13 Sep 2018 02:38:51 +0200 Subject: [PATCH] - minor cleanups in header file --- src/scripting/vm/jit.cpp | 9 +++++++-- src/scripting/vm/jitintern.h | 11 ++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/scripting/vm/jit.cpp b/src/scripting/vm/jit.cpp index 14960d0f10..b305b13fbe 100644 --- a/src/scripting/vm/jit.cpp +++ b/src/scripting/vm/jit.cpp @@ -92,10 +92,15 @@ JitFuncPtr JitCompile(VMScriptFunction *sfunc) ///////////////////////////////////////////////////////////////////////////// +static const char *OpNames[NUM_OPS] = +{ +#define xx(op, name, mode, alt, kreg, ktype) #op +#include "vmops.h" +#undef xx +}; + void JitCompiler::Codegen() { - using namespace asmjit; - Setup(); pc = sfunc->Code; diff --git a/src/scripting/vm/jitintern.h b/src/scripting/vm/jitintern.h index b716843efb..ffbc8d9544 100644 --- a/src/scripting/vm/jitintern.h +++ b/src/scripting/vm/jitintern.h @@ -24,13 +24,6 @@ extern int VMCalls[10]; #define ABCs (pc[0].i24) #define JMPOFS(x) ((x)->i24) -static const char *OpNames[NUM_OPS] = -{ -#define xx(op, name, mode, alt, kreg, ktype) #op -#include "vmops.h" -#undef xx -}; - class JitCompiler { public: @@ -46,15 +39,15 @@ private: #include "vmops.h" #undef xx + void Setup(); void EmitOpcode(); + void EmitDoCall(asmjit::X86Gp ptr); void StoreInOuts(int b); void LoadReturns(const VMOP *retval, int numret, bool inout); void FillReturns(const VMOP *retval, int numret); static int DoCall(VMFrameStack *stack, VMFunction *call, int b, int c, VMValue *param, VMReturn *returns, JitExceptionInfo *exceptinfo); - void Setup(); - template void EmitComparisonOpcode(Func jmpFunc) {