#define INSTR_SETTABLE (-10)
#define INSTR_POP (-11)
+#define INSTR_PUSHREF (-12)
/**
* Represents a single instruction that pushes a new value or works with existing ones.
{
s16 type; // LUA_T* or INSTR_*
u16 set_into; // set into table on stack
+ bool keep_ref; // is referenced later by INSTR_PUSHREF?
bool pop; // remove from stack?
union {
bool bdata; // boolean: value
s32 sidata1, sidata2;
};
void *ptrdata; // userdata: implementation defined
+ s32 ref; // PUSHREF: index of referenced instr
};
/*
- string: value
*/
std::string sdata;
- PackedInstr() : type(0), set_into(0), pop(false) {}
+ PackedInstr() : type(0), set_into(0), keep_ref(false), pop(false) {}
};
/**