Update SQUIRREL to 2.2.5
[supertux.git] / external / squirrel / squirrel / sqopcodes.h
old mode 100644 (file)
new mode 100755 (executable)
index a05788b..3867a59
-/*     see copyright notice in squirrel.h */
-#ifndef _SQOPCODES_H_
-#define _SQOPCODES_H_
-
-#define MAX_FUNC_STACKSIZE 0xFF
-#define MAX_LITERALS ((SQInteger)0x7FFFFFFF)
-
-enum BitWiseOP {
-       BW_AND = 0,
-       BW_OR = 2,      
-       BW_XOR = 3,
-       BW_SHIFTL = 4,
-       BW_SHIFTR = 5,
-       BW_USHIFTR = 6
-};
-
-enum CmpOP {
-       CMP_G = 0,
-       CMP_GE = 2,     
-       CMP_L = 3,
-       CMP_LE = 4
-};
-enum SQOpcode
-{
-       _OP_LINE=                               0x00,   
-       _OP_LOAD=                               0x01,
-       _OP_LOADINT=                    0x02,
-       _OP_LOADFLOAT=                  0x03,
-       _OP_DLOAD=                              0x04,
-       _OP_TAILCALL=                   0x05,   
-       _OP_CALL=                               0x06,   
-       _OP_PREPCALL=                   0x07,   
-       _OP_PREPCALLK=                  0x08,   
-       _OP_GETK=                               0x09,   
-       _OP_MOVE=                               0x0A,   
-       _OP_NEWSLOT=                    0x0B,   
-       _OP_DELETE=                             0x0C,   
-       _OP_SET=                                0x0D,   
-       _OP_GET=                                0x0E,
-       _OP_EQ=                                 0x0F,
-       _OP_NE=                                 0x10,
-       _OP_ARITH=                              0x11,
-       _OP_BITW=                               0x12,
-       _OP_RETURN=                             0x13,   
-       _OP_LOADNULLS=                  0x14,   
-       _OP_LOADROOTTABLE=              0x15,
-       _OP_LOADBOOL=                   0x16,
-       _OP_DMOVE=                              0x17,   
-       _OP_JMP=                                0x18,   
-       _OP_JNZ=                                0x19,   
-       _OP_JZ=                                 0x1A,   
-       _OP_LOADFREEVAR=                0x1B,   
-       _OP_VARGC=                              0x1C,   
-       _OP_GETVARGV=                   0x1D,   
-       _OP_NEWTABLE=                   0x1E,   
-       _OP_NEWARRAY=                   0x1F,   
-       _OP_APPENDARRAY=                0x20,   
-       _OP_GETPARENT=                  0x21,   
-       _OP_COMPARITH=                  0x22,   
-       _OP_COMPARITHL=                 0x23,   
-       _OP_INC=                                0x24,   
-       _OP_INCL=                               0x25,   
-       _OP_PINC=                               0x26,   
-       _OP_PINCL=                              0x27,   
-       _OP_CMP=                                0x28,
-       _OP_EXISTS=                             0x29,   
-       _OP_INSTANCEOF=                 0x2A,
-       _OP_AND=                                0x2B,
-       _OP_OR=                                 0x2C,
-       _OP_NEG=                                0x2D,
-       _OP_NOT=                                0x2E,
-       _OP_BWNOT=                              0x2F,   
-       _OP_CLOSURE=                    0x30,   
-       _OP_YIELD=                              0x31,   
-       _OP_RESUME=                             0x32,
-       _OP_FOREACH=                    0x33,
-       _OP_POSTFOREACH=                0x34,
-       _OP_DELEGATE=                   0x35,
-       _OP_CLONE=                              0x36,
-       _OP_TYPEOF=                             0x37,
-       _OP_PUSHTRAP=                   0x38,
-       _OP_POPTRAP=                    0x39,
-       _OP_THROW=                              0x3A,
-       _OP_CLASS=                              0x3B,
-       _OP_NEWSLOTA=                   0x3C,
-};                                                       
-
-struct SQInstructionDesc {       
-       const SQChar *name;               
-};                                                       
-
-struct SQInstruction 
-{
-       SQInstruction(){};
-       SQInstruction(SQOpcode _op,SQInteger a0=0,SQInteger a1=0,SQInteger a2=0,SQInteger a3=0)
-       {       op = _op;
-               _arg0 = (unsigned char)a0;_arg1 = (SQInt32)a1;
-               _arg2 = (unsigned char)a2;_arg3 = (unsigned char)a3;
-       }
-    
-       
-       SQInt32 _arg1;
-       unsigned char op;
-       unsigned char _arg0;
-       unsigned char _arg2;
-       unsigned char _arg3;
-};
-
-#include "squtils.h"
-typedef sqvector<SQInstruction> SQInstructionVec;
-
-#define NEW_SLOT_ATTRIBUTES_FLAG       0x01
-#define NEW_SLOT_STATIC_FLAG           0x02
-
-#endif // _SQOPCODES_H_
+/*     see copyright notice in squirrel.h */\r
+#ifndef _SQOPCODES_H_\r
+#define _SQOPCODES_H_\r
+\r
+#define MAX_FUNC_STACKSIZE 0xFF\r
+#define MAX_LITERALS ((SQInteger)0x7FFFFFFF)\r
+\r
+enum BitWiseOP {\r
+       BW_AND = 0,\r
+       BW_OR = 2,      \r
+       BW_XOR = 3,\r
+       BW_SHIFTL = 4,\r
+       BW_SHIFTR = 5,\r
+       BW_USHIFTR = 6\r
+};\r
+\r
+enum CmpOP {\r
+       CMP_G = 0,\r
+       CMP_GE = 2,     \r
+       CMP_L = 3,\r
+       CMP_LE = 4\r
+};\r
+enum SQOpcode\r
+{\r
+       _OP_LINE=                               0x00,   \r
+       _OP_LOAD=                               0x01,\r
+       _OP_LOADINT=                    0x02,\r
+       _OP_LOADFLOAT=                  0x03,\r
+       _OP_DLOAD=                              0x04,\r
+       _OP_TAILCALL=                   0x05,   \r
+       _OP_CALL=                               0x06,   \r
+       _OP_PREPCALL=                   0x07,   \r
+       _OP_PREPCALLK=                  0x08,   \r
+       _OP_GETK=                               0x09,   \r
+       _OP_MOVE=                               0x0A,   \r
+       _OP_NEWSLOT=                    0x0B,   \r
+       _OP_DELETE=                             0x0C,   \r
+       _OP_SET=                                0x0D,   \r
+       _OP_GET=                                0x0E,\r
+       _OP_EQ=                                 0x0F,\r
+       _OP_NE=                                 0x10,\r
+       _OP_ARITH=                              0x11,\r
+       _OP_BITW=                               0x12,\r
+       _OP_RETURN=                             0x13,   \r
+       _OP_LOADNULLS=                  0x14,   \r
+       _OP_LOADROOTTABLE=              0x15,\r
+       _OP_LOADBOOL=                   0x16,\r
+       _OP_DMOVE=                              0x17,   \r
+       _OP_JMP=                                0x18,   \r
+       _OP_JNZ=                                0x19,   \r
+       _OP_JZ=                                 0x1A,   \r
+       _OP_LOADFREEVAR=                0x1B,   \r
+       _OP_VARGC=                              0x1C,   \r
+       _OP_GETVARGV=                   0x1D,   \r
+       _OP_NEWTABLE=                   0x1E,   \r
+       _OP_NEWARRAY=                   0x1F,   \r
+       _OP_APPENDARRAY=                0x20,   \r
+       _OP_GETPARENT=                  0x21,   \r
+       _OP_COMPARITH=                  0x22,   \r
+       _OP_COMPARITHL=                 0x23,   \r
+       _OP_INC=                                0x24,   \r
+       _OP_INCL=                               0x25,   \r
+       _OP_PINC=                               0x26,   \r
+       _OP_PINCL=                              0x27,   \r
+       _OP_CMP=                                0x28,\r
+       _OP_EXISTS=                             0x29,   \r
+       _OP_INSTANCEOF=                 0x2A,\r
+       _OP_AND=                                0x2B,\r
+       _OP_OR=                                 0x2C,\r
+       _OP_NEG=                                0x2D,\r
+       _OP_NOT=                                0x2E,\r
+       _OP_BWNOT=                              0x2F,   \r
+       _OP_CLOSURE=                    0x30,   \r
+       _OP_YIELD=                              0x31,   \r
+       _OP_RESUME=                             0x32,\r
+       _OP_FOREACH=                    0x33,\r
+       _OP_POSTFOREACH=                0x34,\r
+       _OP_DELEGATE=                   0x35,\r
+       _OP_CLONE=                              0x36,\r
+       _OP_TYPEOF=                             0x37,\r
+       _OP_PUSHTRAP=                   0x38,\r
+       _OP_POPTRAP=                    0x39,\r
+       _OP_THROW=                              0x3A,\r
+       _OP_CLASS=                              0x3B,\r
+       _OP_NEWSLOTA=                   0x3C,\r
+};                                                       \r
+\r
+struct SQInstructionDesc {       \r
+       const SQChar *name;               \r
+};                                                       \r
+\r
+struct SQInstruction \r
+{\r
+       SQInstruction(){};\r
+       SQInstruction(SQOpcode _op,SQInteger a0=0,SQInteger a1=0,SQInteger a2=0,SQInteger a3=0)\r
+       {       op = _op;\r
+               _arg0 = (unsigned char)a0;_arg1 = (SQInt32)a1;\r
+               _arg2 = (unsigned char)a2;_arg3 = (unsigned char)a3;\r
+       }\r
+    \r
+       \r
+       SQInt32 _arg1;\r
+       unsigned char op;\r
+       unsigned char _arg0;\r
+       unsigned char _arg2;\r
+       unsigned char _arg3;\r
+};\r
+\r
+#include "squtils.h"\r
+typedef sqvector<SQInstruction> SQInstructionVec;\r
+\r
+#define NEW_SLOT_ATTRIBUTES_FLAG       0x01\r
+#define NEW_SLOT_STATIC_FLAG           0x02\r
+\r
+#endif // _SQOPCODES_H_\r