28 ptr = asmb->
ptr + asmb->
len;
30 if (len ==
sizeof(
u8))
32 else if (len ==
sizeof(
int))
33 *((
int *)ptr) = (
int)val;
34 else if (len ==
sizeof(
PN))
37 *((
short *)ptr) = (short)val;
59 ptr = (
char *)asmb->
ptr + asmb->
len;
#define PN_FLEX_NEW(N, V, T, S)
#define PN_FLEX_NEEDS(X, N, V, T, S)
PNAsm * potion_asm_write(Potion *P, PNAsm *volatile asmb, char *str, size_t len)
#define PN_MEMZERO_N(X, T, N)
PNAsm * potion_asm_clear(Potion *P, PNAsm *volatile asmb)
the Potion VM instruction set (heavily based on Lua's)
PNAsm * potion_asm_put(Potion *P, PNAsm *volatile asmb, PN val, size_t len)
#define PN_OP(T, A, B)
Warning: This might conflict with the typedef struct PN_OP.
PNAsm * potion_asm_op(Potion *P, PNAsm *volatile asmb, u8 ins, int _a, int _b)
#define PN_MEMCPY_N(X, Y, T, N)
PNAsm * potion_asm_new(Potion *P)
int a
< the op. See vm.c http://www.lua.org/doc/jucs05.pdf
the global interpreter state P. currently singleton (not threads yet)
int b
optional arg, the message
PN_OP - a compressed three-address op (as 32bit int bitfield) TODO: expand to 64bit, check jit then.