home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / harbb30g.zip / INCLUDE / pcode.h < prev    next >
C/C++ Source or Header  |  1999-09-15  |  9KB  |  120 lines

  1. /*
  2.  * $Id: pcode.h,v 1.20 1999/09/15 14:03:37 vszel Exp $
  3.  */
  4.  
  5. /*
  6.  * Harbour Project source code:
  7.  * Header file for the PCODE declarations
  8.  *
  9.  * Copyright 1999 Antonio Linares <alinares@fivetech.com>
  10.  * www - http://www.harbour-project.org
  11.  *
  12.  * This program is free software; you can redistribute it and/or modify
  13.  * it under the terms of the GNU General Public License as published by
  14.  * the Free Software Foundation; either version 2 of the License, or
  15.  * (at your option) any later version, with one exception:
  16.  *
  17.  * The exception is that if you link the Harbour Runtime Library (HRL)
  18.  * and/or the Harbour Virtual Machine (HVM) with other files to produce
  19.  * an executable, this does not by itself cause the resulting executable
  20.  * to be covered by the GNU General Public License. Your use of that
  21.  * executable is in no way restricted on account of linking the HRL
  22.  * and/or HVM code into it.
  23.  *
  24.  * This program is distributed in the hope that it will be useful,
  25.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  26.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  27.  * GNU General Public License for more details.
  28.  *
  29.  * You should have received a copy of the GNU General Public License
  30.  * along with this program; if not, write to the Free Software
  31.  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA (or visit
  32.  * their web site at http://www.gnu.org/).
  33.  *
  34.  */
  35.  
  36. #ifndef HB_PCODE_H_
  37. #define HB_PCODE_H_
  38.  
  39. typedef enum
  40. {
  41.    HB_P_AND,               /* peforms the logical AND of two latest stack values, removes them and places result */
  42.    HB_P_ARRAYAT,           /* places on the virtual machine stack an array element */
  43.    HB_P_ARRAYPUT,          /* sets array element, the array and the index are both on the stack */
  44.    HB_P_EQUAL,             /* check if the latest two values on the stack are equal, removing them and leaving there the result */
  45.    HB_P_ENDBLOCK,          /* end of a codeblock definition */
  46.    HB_P_ENDPROC,           /* instructs the virtual machine to end execution */
  47.    HB_P_EXACTLYEQUAL,      /* check if the latest two values on the stack are exactly equal, removing them and leaving there the result */
  48.    HB_P_FALSE,             /* pushes false on the virtual machine stack */
  49.    HB_P_FORTEST,           /* For STEP. If step > 1 less. If step < 1 greater. */
  50.    HB_P_FUNCTION,          /* instructs the virtual machine to execute a function saving its result */
  51.    HB_P_FRAME,             /* instructs the virtual machine about how many parameters and locals a function uses */
  52.    HB_P_FUNCPTR,           /* returns a function address pointer */
  53.    HB_P_GENARRAY,          /* instructs the virtual machine to build an array and load elemnst from the stack */
  54.    HB_P_GREATER,           /* checks if the second latest value on the stack is greater that the lastest one */
  55.    HB_P_GREATEREQUAL,      /* checks if the second latest value on the stack is greater equal that the latest one, leaves the result only */
  56.    HB_P_DEC,               /* decrements the latest value on the virtual machine stack */
  57.    HB_P_DIMARRAY,          /* instructs the virtual machine to build an array with some specific dimensions */
  58.    HB_P_DIVIDE,            /* divides the latest two values on the stack, removing them and leaving there the result */
  59.    HB_P_DO,                /* instructs the virtual machine to execute a function discarding its result */
  60.    HB_P_DUPLICATE,         /* places a copy of the latest virtual machine stack value on to the stack */
  61.    HB_P_DUPLTWO,           /* places a copy of the latest two virtual machine stack value on to the stack */
  62.    HB_P_INC,               /* increments the latest value on the virtual machine stack */
  63.    HB_P_INSTRING,          /* checks if the second latest value on the stack is a substring of the latest one */
  64.    HB_P_JUMP,              /* jumps to a relative offset */
  65.    HB_P_JUMPFALSE,         /* checks a logic expression of the stack and jumps to a relative offset */
  66.    HB_P_JUMPTRUE,          /* checks a logic expression of the stack and jumps to a relative offset */
  67.    HB_P_LESSEQUAL,         /* checks if the second latest value on the stack is less equal that the latest one, leaves the result only */
  68.    HB_P_LESS,              /* checks if the second latest value on the stack is less that the lastest one */
  69.    HB_P_LINE,              /* currently compiled source code line number */
  70.    HB_P_LOCALNAME,         /* sets the name of local variable */
  71.    HB_P_MESSAGE,           /* sends a message to an object */
  72.    HB_P_MINUS,             /* subs the latest two values on the stack, removing them and leaving there the result */
  73.    HB_P_MODULUS,           /* calculates the modulus of the two values on the stack, removing them and leaving there the result */
  74.    HB_P_MODULENAME,        /* sets the name of debugged module */
  75.    HB_P_MULT,              /* multiplies the latest two values on the stack, removing them and leaving there the result */
  76.    HB_P_NEGATE,            /* numerically negates the latest value on the stack */
  77.    HB_P_NOOP,              /* no operation */
  78.    HB_P_NOT,               /* logically negates the latest value on the stack */
  79.    HB_P_NOTEQUAL,          /* checks if the latest two stack values are equal, leaves just the result */
  80.    HB_P_OR,                /* peforms the logical OR of two latest stack values, removes them and places result */
  81.    HB_P_PARAMETER,         /* creates PRIVATE variables and assigns values to functions paramaters */
  82.    HB_P_PLUS,              /* adds the latest two values on the stack, removing them and leaving there the result */
  83.    HB_P_POP,               /* removes the latest value from the stack */
  84.    HB_P_POPALIAS,          /* pops the item from the eval stack and selects the current workarea */
  85.    HB_P_POPALIASEDFIELD,   /* pops aliased field */
  86.    HB_P_POPFIELD,          /* pops unaliased field */
  87.    HB_P_POPLOCAL,          /* pops the contains of the virtual machine stack onto a local variable */
  88.    HB_P_POPMEMVAR,         /* pops the contains of a memvar variable to the virtual machine stack */
  89.    HB_P_POPSTATIC,         /* pops the contains of the virtual machine stack onto a static variable */
  90.    HB_P_POWER,             /* calculates the power of the two values on the stack, removing them and leaving there the result */
  91.    HB_P_PUSHALIAS,         /* saves the current workarea number on the eval stack */
  92.    HB_P_PUSHALIASEDFIELD,  /* pushes aliased field */
  93.    HB_P_PUSHBLOCK,         /* start of a codeblock definition */
  94.    HB_P_PUSHFIELD,         /* pushes unaliased field */
  95.    HB_P_PUSHINT,           /* places an integer number on the virtual machine stack */
  96.    HB_P_PUSHLOCAL,         /* pushes the contains of a local variable to the virtual machine stack */
  97.    HB_P_PUSHLOCALREF,      /* pushes a local variable by reference to the virtual machine stack */
  98.    HB_P_PUSHLONG,          /* places an integer number on the virtual machine stack */
  99.    HB_P_PUSHMEMVAR,        /* pushes the contains of a memvar variable to the virtual machine stack */
  100.    HB_P_PUSHMEMVARREF,     /* pushes the a memvar variable by reference to the virtual machine stack */
  101.    HB_P_PUSHNIL,           /* places a nil on the virtual machine stack */
  102.    HB_P_PUSHDOUBLE,        /* places a double number on the virtual machine stack */
  103.    HB_P_PUSHSELF,          /* pushes Self for the current processed method */
  104.    HB_P_PUSHSTATIC,        /* pushes the contains of a static variable to the virtual machine stack */
  105.    HB_P_PUSHSTATICREF,     /* pushes the a static variable by reference to the virtual machine stack */
  106.    HB_P_PUSHSTR,           /* places a string on the virtual machine stack */
  107.    HB_P_PUSHSYM,           /* places a symbol on the virtual machine stack */
  108.    HB_P_RETVALUE,          /* instructs the virtual machine to return the latest stack value */
  109.    HB_P_SEQBEGIN,          /* BEGIN SEQUENCE */
  110.    HB_P_SEQEND,            /* END SEQUENCE */
  111.    HB_P_SEQRECOVER,        /* RECOVER statement */
  112.    HB_P_SFRAME,            /* sets the statics frame for a function */
  113.    HB_P_STATICS,           /* defines the number of statics variables for a PRG */
  114.    HB_P_SWAPALIAS,         /* restores the current workarea number from the eval stack */
  115.    HB_P_TRUE,              /* pushes true on the virtual machine stack */
  116.    HB_P_ZERO               /* places a zero on the virtual machine stack */
  117. } HB_PCODE;
  118.  
  119. #endif /* HB_PCODE_H_ */
  120.