1 /* see copyright notice in squirrel.h */
\r
2 #ifndef _SQOPCODES_H_
\r
3 #define _SQOPCODES_H_
\r
5 #define MAX_FUNC_STACKSIZE 0xFF
\r
6 #define MAX_LITERALS 0xFFFFFFFF
\r
10 BW_OR = 2, //like ADD
\r
19 CMP_GE = 2, //like ADD
\r
28 _OP_TAILCALL= 0x03,
\r
30 _OP_PREPCALL= 0x05,
\r
31 _OP_PREPCALLK= 0x06,
\r
43 _OP_LOADNULLS= 0x12,
\r
44 _OP_LOADROOTTABLE= 0x13,
\r
50 _OP_LOADFREEVAR= 0x19,
\r
52 _OP_GETVARGV= 0x1B,
\r
53 _OP_NEWTABLE= 0x1C,
\r
54 _OP_NEWARRAY= 0x1D,
\r
55 _OP_APPENDARRAY= 0x1E,
\r
56 _OP_GETPARENT= 0x1F,
\r
57 _OP_COMPARITH= 0x20,
\r
58 _OP_COMPARITHL= 0x21,
\r
65 _OP_INSTANCEOF= 0x28,
\r
86 struct SQInstructionDesc {
\r
87 const SQChar *name;
\r
90 struct SQInstruction
\r
93 SQInstruction(SQOpcode _op,SQInteger a0=0,SQInteger a1=0,SQInteger a2=0,SQInteger a3=0)
\r
95 _arg0 = a0;_arg1 = a1;
\r
96 _arg2 = a2;_arg3 = a3;
\r
102 unsigned char _arg0;
\r
103 unsigned char _arg2;
\r
104 unsigned char _arg3;
\r
107 #include "squtils.h"
\r
108 typedef sqvector<SQInstruction> SQInstructionVec;
\r
110 #endif // _SQOPCODES_H_
\r