- embed and use asmjit to JIT ZScript VM functions

This commit is contained in:
Magnus Norddahl 2018-08-12 02:11:13 +02:00
commit cbb945d8a7
79 changed files with 50124 additions and 2 deletions

View file

@ -437,6 +437,8 @@ extern thread_local VMFrameStack GlobalVMStack;
typedef std::pair<const class PType *, unsigned> FTypeAndOffset;
typedef int(*JitFuncPtr)(VMFrameStack *stack, VMReturn *ret, int numret);
class VMScriptFunction : public VMFunction
{
public:
@ -467,6 +469,9 @@ public:
VM_UBYTE NumArgs; // Number of arguments this function takes
TArray<FTypeAndOffset> SpecialInits; // list of all contents on the extra stack which require construction and destruction
bool JitCompiled = false;
JitFuncPtr JitFunc = nullptr;
void InitExtra(void *addr);
void DestroyExtra(void *addr);
int AllocExtraStack(PType *type);