• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

spl/interp/OpCodes.h

00001 /*
00002  *   This file is part of the Standard Portable Library (SPL).
00003  *
00004  *   SPL is free software: you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, either version 3 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   SPL is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with SPL.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 #ifndef _interp_opcodes_h
00018 #define _interp_opcodes_h
00019 
00020 #include <spl/types.h>
00021 #include <spl/Debug.h>
00022 
00036 enum JsOpCode
00037 {
00038         JSOP_NOP = 0,           
00039         JSOP_POP = 1,           
00040         JSOP_PUSH = 2,          
00041         JSOP_ROT = 3,           
00042         JSOP_ROT3 = 4,          
00043         JSOP_DUP = 5,           
00045         JSOP_ADD = 6,           
00046         JSOP_SUB = 7,           
00047         JSOP_NEGATE = 8,        
00048         JSOP_MULT = 9,          
00049         JSOP_DIV = 10,          
00050         JSOP_MOD = 11,          
00051         JSOP_INC = 12,          
00052         JSOP_DEC = 13,          
00054         JSOP_AND = 14,          
00055         JSOP_BINAND = 15,       
00056         JSOP_OR = 16,           
00057         JSOP_BINOR = 17,        
00058         JSOP_XOR = 18,          
00059         JSOP_COMPL = 19,        
00060         JSOP_NOT = 20,          
00062         JSOP_RSHIFT = 21,       
00063         JSOP_LSHIFT = 22,       
00065         JSOP_LT = 23,           
00066         JSOP_GT = 24,           
00067         JSOP_LTEQ = 25,         
00068         JSOP_GTEQ = 26,         
00069         JSOP_EQ = 27,           
00070         JSOP_NEQ = 28,          
00072         JSOP_ASSIGN = 29,       
00073         JSOP_THIS = 30,         
00074         JSOP_NULL = 31,         
00075         JSOP_DEREF = 32,        
00076         JSOP_FINDPROP = 33,     
00077         JSOP_DEFPROP = 47,      
00079         JSOP_ENTER = 34,        
00080         JSOP_LEAVE = 35,        
00081         JSOP_CALL = 36,         
00082         JSOP_RET = 37,          
00083         JSOP_NEW = 38,          
00085         JSOP_JMPZ = 39,         
00086         JSOP_JMPNZ = 40,        
00087         JSOP_JMP = 41,          
00089         JSOP_TRY = 42,          
00090         JSOP_THROW = 43,        
00092         JSOP_LINE = 44,         
00094         JSOP_EXIT = 45          
00095 };
00096 
00097 enum JsOpCodeArgSrc
00098 {
00099         JSOPARG_NONE = 0,
00100         JSOPARG_IMM = 1,
00101         JSOPARG_TAB = 2,
00102         JSOPARG_STK = 3
00103 };
00104 
00105 #endif