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 ((SQInteger)0x7FFFFFFF)
\r
10 BW_OR = 2, //like ADD
\r
19 CMP_GE = 2, //like ADD
\r
29 _OP_TAILCALL= 0x04,
\r
31 _OP_PREPCALL= 0x06,
\r
32 _OP_PREPCALLK= 0x07,
\r
44 _OP_LOADNULLS= 0x13,
\r
45 _OP_LOADROOTTABLE= 0x14,
\r
51 _OP_LOADFREEVAR= 0x1A,
\r
53 _OP_GETVARGV= 0x1C,
\r
54 _OP_NEWTABLE= 0x1D,
\r
55 _OP_NEWARRAY= 0x1E,
\r
56 _OP_APPENDARRAY= 0x1F,
\r
57 _OP_GETPARENT= 0x20,
\r
58 _OP_COMPARITH= 0x21,
\r
59 _OP_COMPARITHL= 0x22,
\r
66 _OP_INSTANCEOF= 0x29,
\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 = (unsigned char)a0;_arg1 = (SQInt32)a1;
\r
96 _arg2 = (unsigned char)a2;_arg3 = (unsigned char)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 #define NEW_SLOT_ATTRIBUTES_FLAG 0x01
\r
111 #define NEW_SLOT_STATIC_FLAG 0x02
\r
113 #endif // _SQOPCODES_H_
\r