#ifndef POTION_OPCODES_H
#define POTION_OPCODES_H
enum PN_OPCODE {
OP_NONE,
OP_MOVE,
OP_LOADK,
OP_LOADPN,
OP_SELF,
OP_NEWTUPLE,
OP_GETTUPLE,
OP_SETTUPLE,
OP_GETLOCAL,
OP_SETLOCAL,
OP_GETUPVAL,
OP_SETUPVAL,
OP_GLOBAL,
OP_GETTABLE,
OP_SETTABLE,
OP_NEWLICK,
OP_GETPATH,
OP_SETPATH,
OP_ADD,
OP_SUB,
OP_MULT,
OP_DIV,
OP_REM,
OP_POW,
OP_NOT,
OP_CMP,
OP_EQ,
OP_NEQ,
OP_LT,
OP_LTE,
OP_GT,
OP_GTE,
OP_BITN,
OP_BITL,
OP_BITR,
OP_DEF,
OP_BIND,
OP_MSG,
OP_JMP,
OP_TEST,
OP_TESTJMP,
OP_NOTJMP,
OP_NAMED,
OP_CALL,
OP_CALLSET,
OP_TAILCALL,
OP_RETURN,
OP_PROTO,
OP_CLASS,
OP_DEBUG
};
#if defined(__GNUC__)
#pragma pack(1)
#else
#pragma pack(push, 1)
#endif
typedef struct {
enum PN_OPCODE code:8;
int a:12;
int b:12;
} PN_OP;
#if defined(__GNUC__)
#pragma pack()
#else
#pragma pack(pop)
#endif
#define PN_OP_AT(asmb, n) ((PN_OP *)((PNFlex *)asmb)->ptr)[n]
#define PN_OP_LEN(asmb) (PN_FLEX_SIZE(asmb) / sizeof(PN_OP))
#endif