#ifndef __GACK
#define __GACK
-ANN void gack(const VM_Shred, const Instr);
+ANN void gack(const VM_Shred, const m_uint);
#define INTERP_PRINTF(fmt, ...) { \
m_str ret = *(m_str*)(VALUE - SZ_INT);\
shred->pc = 0;
}
-ANN void gack(const VM_Shred shred, const Instr instr) {
+ANN void gack(const VM_Shred shred, const m_uint offset) {
const Type t = *(Type*)shred->reg;
const VM_Code code = get_gack(t);
if(GET_FLAG(code, builtin)) {
((f_gack)code->native_func)(t, (shred->reg - t->size), shred);
POP_REG(shred, t->size);
} else {
- prepare_call(shred, instr->m_val2);
+ prepare_call(shred, offset);
shred->code = code;
POP_REG(shred, SZ_INT*2);
}
instr->opcode = eRegPushImm;
instr->m_val = (m_uint)code;
}
- if(instr->opcode < eGack)
+ if(instr->opcode < eOP_MAX)
memcpy(ptr + i*BYTECODE_SZ, instr, BYTECODE_SZ);
else {
*(m_bit*)(ptr + (i*BYTECODE_SZ)) = instr->opcode;