/ Check-in [7e54d3c7]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change 'stack' to the more descriptive 'no-push' in vdbe.c. (CVS 2429)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:7e54d3c7289c091d449844d21b923e553f1d1f5f
User & Date: danielk1977 2005-03-29 13:07:00
Context
2005-03-29
13:17
Fix a C++-ism in the code. (CVS 2430) check-in: 312587ac user: drh tags: trunk
13:07
Change 'stack' to the more descriptive 'no-push' in vdbe.c. (CVS 2429) check-in: 7e54d3c7 user: danielk1977 tags: trunk
08:26
Reduce the space allocated for the runtime virtual machine stack. (CVS 2428) check-in: 7d6818da user: danielk1977 tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to mkopcodeh.awk.

    40     40       if($i=="same" && $(i+1)=="as"){
    41     41         sym = $(i+2)
    42     42         sub(/,/,"",sym)
    43     43         op[name] = tk[sym]
    44     44         used[op[name]] = 1
    45     45         sameas[op[name]] = sym
    46     46       }
    47         -    if($i=="stack"){
    48         -      stack[name] = 1
           47  +    if($i=="no-push"){
           48  +      nopush[name] = 1
    49     49       }
    50     50     }
    51     51   }
    52     52   
    53     53   # Assign numbers to all opcodes and output the result.
    54     54   END {
    55     55     cnt = 0
................................................................................
    81     81         printf "#define %-25s %15d\n", sprintf( "OP_NotUsed_%-3d", i ), i
    82     82       }
    83     83     }
    84     84   
    85     85     # Generate the 10 16-bit bitmasks used by function opcodeUsesStack()
    86     86     # in vdbeaux.c. See comments in that function for details.
    87     87     # 
    88         -  stack[0] = 0              # 0..15
    89         -  stack[1] = 0              # 16..31
    90         -  stack[2] = 0              # 32..47
    91         -  stack[3] = 0              # 48..63
    92         -  stack[4] = 0              # 64..79
    93         -  stack[5] = 0              # 80..95
    94         -  stack[6] = 0              # 96..111
    95         -  stack[7] = 0              # 112..127
    96         -  stack[8] = 0              # 128..143
    97         -  stack[9] = 0              # 144..159
           88  +  nopush[0] = 0              # 0..15
           89  +  nopush[1] = 0              # 16..31
           90  +  nopush[2] = 0              # 32..47
           91  +  nopush[3] = 0              # 48..63
           92  +  nopush[4] = 0              # 64..79
           93  +  nopush[5] = 0              # 80..95
           94  +  nopush[6] = 0              # 96..111
           95  +  nopush[7] = 0              # 112..127
           96  +  nopush[8] = 0              # 128..143
           97  +  nopush[9] = 0              # 144..159
    98     98     for(name in op){
    99         -    if( stack[name] ){
           99  +    if( nopush[name] ){
   100    100         n = op[name]
   101    101         j = n%16
   102    102         i = ((n - j)/16)
   103         -      stack[i] = stack[i] + (2^j)
          103  +      nopush[i] = nopush[i] + (2^j)
   104    104       }
   105    105     }
   106    106     printf "\n"
   107    107     for(i=0; i<10; i++){
   108         -    printf "#define STACK_MASK_%d %d\n", i, stack[i]
          108  +    printf "#define NOPUSH_MASK_%d %d\n", i, nopush[i]
   109    109     }
   110         -
   111    110   }

Changes to src/vdbe.c.

    39     39   **
    40     40   ** Various scripts scan this source file in order to generate HTML
    41     41   ** documentation, headers files, or other derived files.  The formatting
    42     42   ** of the code in this file is, therefore, important.  See other comments
    43     43   ** in this file for details.  If in doubt, do not deviate from existing
    44     44   ** commenting and indentation practices when changing or adding code.
    45     45   **
    46         -** $Id: vdbe.c,v 1.462 2005/03/29 08:26:13 danielk1977 Exp $
           46  +** $Id: vdbe.c,v 1.463 2005/03/29 13:07:00 danielk1977 Exp $
    47     47   */
    48     48   #include "sqliteInt.h"
    49     49   #include "os.h"
    50     50   #include <ctype.h>
    51     51   #include "vdbeInt.h"
    52     52   
    53     53   /*
................................................................................
   534    534         }
   535    535         nProgressOps++;
   536    536       }
   537    537   #endif
   538    538   
   539    539   #ifndef NDEBUG
   540    540       /* This is to check that the return value of static function
   541         -    ** opcodeUsesStack() (see vdbeaux.c) returns values that match the
          541  +    ** opcodeNoPush() (see vdbeaux.c) returns values that match the
   542    542       ** implementation of the virtual machine in this file. If
   543         -    ** opcodeUsesStack() returns non-zero, then the stack is guarenteed
          543  +    ** opcodeNoPush() returns non-zero, then the stack is guarenteed
   544    544       ** not to grow when the opcode is executed. If it returns zero, then
   545    545       ** the stack may grow by at most 1.
   546    546       **
   547    547       ** The global wrapper function sqlite3VdbeOpcodeUsesStack() is not 
   548    548       ** available if NDEBUG is defined at build time.
   549    549       */ 
   550    550       pStackLimit = pTos;
   551         -    if( !sqlite3VdbeOpcodeUsesStack(pOp->opcode) ){
          551  +    if( !sqlite3VdbeOpcodeNoPush(pOp->opcode) ){
   552    552         pStackLimit++;
   553    553       }
   554    554   #endif
   555    555   
   556    556       switch( pOp->opcode ){
   557    557   
   558    558   /*****************************************************************************
................................................................................
   570    570   ** will be filled with #defines that give unique integer values to each
   571    571   ** opcode and the opcodes.c file is filled with an array of strings where
   572    572   ** each string is the symbolic name for the corresponding opcode.  If the
   573    573   ** case statement is followed by a comment of the form "/# same as ... #/"
   574    574   ** that comment is used to determine the particular value of the opcode.
   575    575   **
   576    576   ** If a comment on the same line as the "case OP_" construction contains
   577         -** the word "stack", then the opcode is guarenteed not to grow the 
   578         -** vdbe stack when it is executed. See function opcodeUsesStack() in
          577  +** the word "no-push", then the opcode is guarenteed not to grow the 
          578  +** vdbe stack when it is executed. See function opcode() in
   579    579   ** vdbeaux.c for details.
   580    580   **
   581    581   ** Documentation about VDBE opcodes is generated by scanning this file
   582    582   ** for lines of that contain "Opcode:".  That line and all subsequent
   583    583   ** comment lines are used in the generation of the opcode.html documentation
   584    584   ** file.
   585    585   **
................................................................................
   593    593   /* Opcode:  Goto * P2 *
   594    594   **
   595    595   ** An unconditional jump to address P2.
   596    596   ** The next instruction executed will be 
   597    597   ** the one at index P2 from the beginning of
   598    598   ** the program.
   599    599   */
   600         -case OP_Goto: {             /* no stack growth */
          600  +case OP_Goto: {             /* no-push */
   601    601     CHECK_FOR_INTERRUPT;
   602    602     pc = pOp->p2 - 1;
   603    603     break;
   604    604   }
   605    605   
   606    606   /* Opcode:  Gosub * P2 *
   607    607   **
................................................................................
   609    609   ** and then jump to address P2.
   610    610   **
   611    611   ** The return address stack is of limited depth.  If too many
   612    612   ** OP_Gosub operations occur without intervening OP_Returns, then
   613    613   ** the return address stack will fill up and processing will abort
   614    614   ** with a fatal error.
   615    615   */
   616         -case OP_Gosub: {            /* no stack growth */
          616  +case OP_Gosub: {            /* no-push */
   617    617     assert( p->returnDepth<sizeof(p->returnStack)/sizeof(p->returnStack[0]) );
   618    618     p->returnStack[p->returnDepth++] = pc+1;
   619    619     pc = pOp->p2 - 1;
   620    620     break;
   621    621   }
   622    622   
   623    623   /* Opcode:  Return * * *
   624    624   **
   625    625   ** Jump immediately to the next instruction after the last unreturned
   626    626   ** OP_Gosub.  If an OP_Return has occurred for all OP_Gosubs, then
   627    627   ** processing aborts with a fatal error.
   628    628   */
   629         -case OP_Return: {           /* no stack growth */
          629  +case OP_Return: {           /* no-push */
   630    630     assert( p->returnDepth>0 );
   631    631     p->returnDepth--;
   632    632     pc = p->returnStack[p->returnDepth] - 1;
   633    633     break;
   634    634   }
   635    635   
   636    636   /* Opcode:  Halt P1 P2 *
................................................................................
   646    646   ** then back out all changes that have occurred during this execution of the
   647    647   ** VDBE, but do not rollback the transaction. 
   648    648   **
   649    649   ** There is an implied "Halt 0 0 0" instruction inserted at the very end of
   650    650   ** every program.  So a jump past the last instruction of the program
   651    651   ** is the same as executing Halt.
   652    652   */
   653         -case OP_Halt: {            /* no stack growth */
          653  +case OP_Halt: {            /* no-push */
   654    654     p->pTos = pTos;
   655    655     p->rc = pOp->p1;
   656    656     p->pc = pc;
   657    657     p->errorAction = pOp->p2;
   658    658     if( pOp->p3 ){
   659    659       sqlite3SetString(&p->zErrMsg, pOp->p3, (char*)0);
   660    660     }
................................................................................
   828    828     break;
   829    829   }
   830    830   
   831    831   /* Opcode: Pop P1 * *
   832    832   **
   833    833   ** P1 elements are popped off of the top of stack and discarded.
   834    834   */
   835         -case OP_Pop: {            /* no stack growth */
          835  +case OP_Pop: {            /* no-push */
   836    836     assert( pOp->p1>=0 );
   837    837     popStack(&pTos, pOp->p1);
   838    838     assert( pTos>=&p->aStack[-1] );
   839    839     break;
   840    840   }
   841    841   
   842    842   /* Opcode: Dup P1 P2 *
................................................................................
   871    871   ** the stack and pushed back on top of the stack.  The
   872    872   ** top of the stack is element 0, so "Pull 0 0 0" is
   873    873   ** a no-op.  "Pull 1 0 0" swaps the top two elements of
   874    874   ** the stack.
   875    875   **
   876    876   ** See also the Dup instruction.
   877    877   */
   878         -case OP_Pull: {            /* no stack growth */
          878  +case OP_Pull: {            /* no-push */
   879    879     Mem *pFrom = &pTos[-pOp->p1];
   880    880     int i;
   881    881     Mem ts;
   882    882   
   883    883     ts = *pFrom;
   884    884     Deephemeralize(pTos);
   885    885     for(i=0; i<pOp->p1; i++, pFrom++){
................................................................................
   903    903   
   904    904   /* Opcode: Push P1 * *
   905    905   **
   906    906   ** Overwrite the value of the P1-th element down on the
   907    907   ** stack (P1==0 is the top of the stack) with the value
   908    908   ** of the top of the stack.  Then pop the top of the stack.
   909    909   */
   910         -case OP_Push: {            /* no stack growth */
          910  +case OP_Push: {            /* no-push */
   911    911     Mem *pTo = &pTos[-pOp->p1];
   912    912   
   913    913     assert( pTo>=p->aStack );
   914    914     sqlite3VdbeMemMove(pTo, pTos);
   915    915     pTos--;
   916    916     break;
   917    917   }
................................................................................
   918    918   
   919    919   /* Opcode: Callback P1 * *
   920    920   **
   921    921   ** Pop P1 values off the stack and form them into an array.  Then
   922    922   ** invoke the callback function using the newly formed array as the
   923    923   ** 3rd parameter.
   924    924   */
   925         -case OP_Callback: {            /* no stack growth */
          925  +case OP_Callback: {            /* no-push */
   926    926     int i;
   927    927     assert( p->nResColumn==pOp->p1 );
   928    928   
   929    929     for(i=0; i<pOp->p1; i++){
   930    930       Mem *pVal = &pTos[0-i];
   931    931       sqlite3VdbeMemNulTerminate(pVal);
   932    932       storeTypeInfo(pVal, db->enc);
................................................................................
  1054   1054   ** first (what was on top of the stack) from the second (the
  1055   1055   ** next on stack)
  1056   1056   ** and push the remainder after division onto the stack.  If either element
  1057   1057   ** is a string then it is converted to a double using the atof()
  1058   1058   ** function before the division.  Division by zero returns NULL.
  1059   1059   ** If either operand is NULL, the result is NULL.
  1060   1060   */
  1061         -case OP_Add:                   /* same as TK_PLUS, no stack growth */
  1062         -case OP_Subtract:              /* same as TK_MINUS, no stack growth */
  1063         -case OP_Multiply:              /* same as TK_STAR, no stack growth */
  1064         -case OP_Divide:                /* same as TK_SLASH, no stack growth */
  1065         -case OP_Remainder: {           /* same as TK_REM, no stack growth */
         1061  +case OP_Add:                   /* same as TK_PLUS, no-push */
         1062  +case OP_Subtract:              /* same as TK_MINUS, no-push */
         1063  +case OP_Multiply:              /* same as TK_STAR, no-push */
         1064  +case OP_Divide:                /* same as TK_SLASH, no-push */
         1065  +case OP_Remainder: {           /* same as TK_REM, no-push */
  1066   1066     Mem *pNos = &pTos[-1];
  1067   1067     assert( pNos>=p->aStack );
  1068   1068     if( ((pTos->flags | pNos->flags) & MEM_Null)!=0 ){
  1069   1069       Release(pTos);
  1070   1070       pTos--;
  1071   1071       Release(pTos);
  1072   1072       pTos->flags = MEM_Null;
................................................................................
  1138   1138   ** be returned. This is used by the built-in min(), max() and nullif()
  1139   1139   ** functions.
  1140   1140   **
  1141   1141   ** The interface used by the implementation of the aforementioned functions
  1142   1142   ** to retrieve the collation sequence set by this opcode is not available
  1143   1143   ** publicly, only to user functions defined in func.c.
  1144   1144   */
  1145         -case OP_CollSeq: {             /* no stack growth */
         1145  +case OP_CollSeq: {             /* no-push */
  1146   1146     assert( pOp->p3type==P3_COLLSEQ );
  1147   1147     break;
  1148   1148   }
  1149   1149   
  1150   1150   /* Opcode: Function P1 P2 P3
  1151   1151   **
  1152   1152   ** Invoke a user function (P3 is a pointer to a Function structure that
................................................................................
  1256   1256   /* Opcode: ShiftRight * * *
  1257   1257   **
  1258   1258   ** Pop the top two elements from the stack.  Convert both elements
  1259   1259   ** to integers.  Push back onto the stack the second element shifted
  1260   1260   ** right by N bits where N is the top element on the stack.
  1261   1261   ** If either operand is NULL, the result is NULL.
  1262   1262   */
  1263         -case OP_BitAnd:                 /* same as TK_BITAND, no stack growth */
  1264         -case OP_BitOr:                  /* same as TK_BITOR, no stack growth */
  1265         -case OP_ShiftLeft:              /* same as TK_LSHIFT, no stack growth */
  1266         -case OP_ShiftRight: {           /* same as TK_RSHIFT, no stack growth */
         1263  +case OP_BitAnd:                 /* same as TK_BITAND, no-push */
         1264  +case OP_BitOr:                  /* same as TK_BITOR, no-push */
         1265  +case OP_ShiftLeft:              /* same as TK_LSHIFT, no-push */
         1266  +case OP_ShiftRight: {           /* same as TK_RSHIFT, no-push */
  1267   1267     Mem *pNos = &pTos[-1];
  1268   1268     int a, b;
  1269   1269   
  1270   1270     assert( pNos>=p->aStack );
  1271   1271     if( (pTos->flags | pNos->flags) & MEM_Null ){
  1272   1272       popStack(&pTos, 2);
  1273   1273       pTos++;
................................................................................
  1294   1294   /* Opcode: AddImm  P1 * *
  1295   1295   ** 
  1296   1296   ** Add the value P1 to whatever is on top of the stack.  The result
  1297   1297   ** is always an integer.
  1298   1298   **
  1299   1299   ** To force the top of the stack to be an integer, just add 0.
  1300   1300   */
  1301         -case OP_AddImm: {            /* no stack growth */
         1301  +case OP_AddImm: {            /* no-push */
  1302   1302     assert( pTos>=p->aStack );
  1303   1303     Integerify(pTos);
  1304   1304     pTos->i += pOp->p1;
  1305   1305     break;
  1306   1306   }
  1307   1307   
  1308   1308   /* Opcode: ForceInt P1 P2 *
................................................................................
  1311   1311   ** the stack is not numeric (meaning that is is a NULL or a string that
  1312   1312   ** does not look like an integer or floating point number) then pop the
  1313   1313   ** stack and jump to P2.  If the top of the stack is numeric then
  1314   1314   ** convert it into the least integer that is greater than or equal to its
  1315   1315   ** current value if P1==0, or to the least integer that is strictly
  1316   1316   ** greater than its current value if P1==1.
  1317   1317   */
  1318         -case OP_ForceInt: {            /* no stack growth */
         1318  +case OP_ForceInt: {            /* no-push */
  1319   1319     int v;
  1320   1320     assert( pTos>=p->aStack );
  1321   1321     applyAffinity(pTos, SQLITE_AFF_INTEGER, db->enc);
  1322   1322     if( (pTos->flags & (MEM_Int|MEM_Real))==0 ){
  1323   1323       Release(pTos);
  1324   1324       pTos--;
  1325   1325       pc = pOp->p2 - 1;
................................................................................
  1346   1346   ** with out data loss, then jump immediately to P2, or if P2==0
  1347   1347   ** raise an SQLITE_MISMATCH exception.
  1348   1348   **
  1349   1349   ** If the top of the stack is not an integer and P2 is not zero and
  1350   1350   ** P1 is 1, then the stack is popped.  In all other cases, the depth
  1351   1351   ** of the stack is unchanged.
  1352   1352   */
  1353         -case OP_MustBeInt: {            /* no stack growth */
         1353  +case OP_MustBeInt: {            /* no-push */
  1354   1354     assert( pTos>=p->aStack );
  1355   1355     applyAffinity(pTos, SQLITE_AFF_INTEGER, db->enc);
  1356   1356     if( (pTos->flags & MEM_Int)==0 ){
  1357   1357       if( pOp->p2==0 ){
  1358   1358         rc = SQLITE_MISMATCH;
  1359   1359         goto abort_due_to_error;
  1360   1360       }else{
................................................................................
  1421   1421   */
  1422   1422   /* Opcode: Ge P1 P2 P3
  1423   1423   **
  1424   1424   ** This works just like the Eq opcode except that the jump is taken if
  1425   1425   ** the 2nd element down on the stack is greater than or equal to the
  1426   1426   ** top of the stack.  See the Eq opcode for additional information.
  1427   1427   */
  1428         -case OP_Eq:               /* same as TK_EQ, no stack growth */
  1429         -case OP_Ne:               /* same as TK_NE, no stack growth */
  1430         -case OP_Lt:               /* same as TK_LT, no stack growth */
  1431         -case OP_Le:               /* same as TK_LE, no stack growth */
  1432         -case OP_Gt:               /* same as TK_GT, no stack growth */
  1433         -case OP_Ge: {             /* same as TK_GE, no stack growth */
         1428  +case OP_Eq:               /* same as TK_EQ, no-push */
         1429  +case OP_Ne:               /* same as TK_NE, no-push */
         1430  +case OP_Lt:               /* same as TK_LT, no-push */
         1431  +case OP_Le:               /* same as TK_LE, no-push */
         1432  +case OP_Gt:               /* same as TK_GT, no-push */
         1433  +case OP_Ge: {             /* same as TK_GE, no-push */
  1434   1434     Mem *pNos;
  1435   1435     int flags;
  1436   1436     int res;
  1437   1437     char affinity;
  1438   1438   
  1439   1439     pNos = &pTos[-1];
  1440   1440     flags = pTos->flags|pNos->flags;
................................................................................
  1492   1492   */
  1493   1493   /* Opcode: Or * * *
  1494   1494   **
  1495   1495   ** Pop two values off the stack.  Take the logical OR of the
  1496   1496   ** two values and push the resulting boolean value back onto the
  1497   1497   ** stack. 
  1498   1498   */
  1499         -case OP_And:              /* same as TK_AND, no stack growth */
  1500         -case OP_Or: {             /* same as TK_OR, no stack growth */
         1499  +case OP_And:              /* same as TK_AND, no-push */
         1500  +case OP_Or: {             /* same as TK_OR, no-push */
  1501   1501     Mem *pNos = &pTos[-1];
  1502   1502     int v1, v2;    /* 0==TRUE, 1==FALSE, 2==UNKNOWN or NULL */
  1503   1503   
  1504   1504     assert( pNos>=p->aStack );
  1505   1505     if( pTos->flags & MEM_Null ){
  1506   1506       v1 = 2;
  1507   1507     }else{
................................................................................
  1540   1540   */
  1541   1541   /* Opcode: AbsValue * * *
  1542   1542   **
  1543   1543   ** Treat the top of the stack as a numeric quantity.  Replace it
  1544   1544   ** with its absolute value. If the top of the stack is NULL
  1545   1545   ** its value is unchanged.
  1546   1546   */
  1547         -case OP_Negative:              /* same as TK_UMINUS, no stack growth */
         1547  +case OP_Negative:              /* same as TK_UMINUS, no-push */
  1548   1548   case OP_AbsValue: {
  1549   1549     assert( pTos>=p->aStack );
  1550   1550     if( pTos->flags & MEM_Real ){
  1551   1551       Release(pTos);
  1552   1552       if( pOp->opcode==OP_Negative || pTos->r<0.0 ){
  1553   1553         pTos->r = -pTos->r;
  1554   1554       }
................................................................................
  1573   1573   
  1574   1574   /* Opcode: Not * * *
  1575   1575   **
  1576   1576   ** Interpret the top of the stack as a boolean value.  Replace it
  1577   1577   ** with its complement.  If the top of the stack is NULL its value
  1578   1578   ** is unchanged.
  1579   1579   */
  1580         -case OP_Not: {                /* same as TK_NOT, no stack growth */
         1580  +case OP_Not: {                /* same as TK_NOT, no-push */
  1581   1581     assert( pTos>=p->aStack );
  1582   1582     if( pTos->flags & MEM_Null ) break;  /* Do nothing to NULLs */
  1583   1583     Integerify(pTos);
  1584   1584     assert( (pTos->flags & MEM_Dyn)==0 );
  1585   1585     pTos->i = !pTos->i;
  1586   1586     pTos->flags = MEM_Int;
  1587   1587     break;
................................................................................
  1589   1589   
  1590   1590   /* Opcode: BitNot * * *
  1591   1591   **
  1592   1592   ** Interpret the top of the stack as an value.  Replace it
  1593   1593   ** with its ones-complement.  If the top of the stack is NULL its
  1594   1594   ** value is unchanged.
  1595   1595   */
  1596         -case OP_BitNot: {             /* same as TK_BITNOT, no stack growth */
         1596  +case OP_BitNot: {             /* same as TK_BITNOT, no-push */
  1597   1597     assert( pTos>=p->aStack );
  1598   1598     if( pTos->flags & MEM_Null ) break;  /* Do nothing to NULLs */
  1599   1599     Integerify(pTos);
  1600   1600     assert( (pTos->flags & MEM_Dyn)==0 );
  1601   1601     pTos->i = ~pTos->i;
  1602   1602     pTos->flags = MEM_Int;
  1603   1603     break;
................................................................................
  1604   1604   }
  1605   1605   
  1606   1606   /* Opcode: Noop * * *
  1607   1607   **
  1608   1608   ** Do nothing.  This instruction is often useful as a jump
  1609   1609   ** destination.
  1610   1610   */
  1611         -case OP_Noop: {            /* no stack growth */
         1611  +case OP_Noop: {            /* no-push */
  1612   1612     break;
  1613   1613   }
  1614   1614   
  1615   1615   /* Opcode: If P1 P2 *
  1616   1616   **
  1617   1617   ** Pop a single boolean from the stack.  If the boolean popped is
  1618   1618   ** true, then jump to p2.  Otherwise continue to the next instruction.
................................................................................
  1628   1628   ** false, then jump to p2.  Otherwise continue to the next instruction.
  1629   1629   ** An integer is false if zero and true otherwise.  A string is
  1630   1630   ** false if it has zero length and true otherwise.
  1631   1631   **
  1632   1632   ** If the value popped of the stack is NULL, then take the jump if P1
  1633   1633   ** is true and fall through if P1 is false.
  1634   1634   */
  1635         -case OP_If:                 /* no stack growth */
  1636         -case OP_IfNot: {            /* no stack growth */
         1635  +case OP_If:                 /* no-push */
         1636  +case OP_IfNot: {            /* no-push */
  1637   1637     int c;
  1638   1638     assert( pTos>=p->aStack );
  1639   1639     if( pTos->flags & MEM_Null ){
  1640   1640       c = pOp->p1;
  1641   1641     }else{
  1642   1642       c = sqlite3VdbeIntValue(pTos);
  1643   1643       if( pOp->opcode==OP_IfNot ) c = !c;
................................................................................
  1650   1650   
  1651   1651   /* Opcode: IsNull P1 P2 *
  1652   1652   **
  1653   1653   ** If any of the top abs(P1) values on the stack are NULL, then jump
  1654   1654   ** to P2.  Pop the stack P1 times if P1>0.   If P1<0 leave the stack
  1655   1655   ** unchanged.
  1656   1656   */
  1657         -case OP_IsNull: {            /* same as TK_ISNULL, no stack growth */
         1657  +case OP_IsNull: {            /* same as TK_ISNULL, no-push */
  1658   1658     int i, cnt;
  1659   1659     Mem *pTerm;
  1660   1660     cnt = pOp->p1;
  1661   1661     if( cnt<0 ) cnt = -cnt;
  1662   1662     pTerm = &pTos[1-cnt];
  1663   1663     assert( pTerm>=p->aStack );
  1664   1664     for(i=0; i<cnt; i++, pTerm++){
................................................................................
  1673   1673   
  1674   1674   /* Opcode: NotNull P1 P2 *
  1675   1675   **
  1676   1676   ** Jump to P2 if the top P1 values on the stack are all not NULL.  Pop the
  1677   1677   ** stack if P1 times if P1 is greater than zero.  If P1 is less than
  1678   1678   ** zero then leave the stack unchanged.
  1679   1679   */
  1680         -case OP_NotNull: {            /* same as TK_NOTNULL, no stack growth */
         1680  +case OP_NotNull: {            /* same as TK_NOTNULL, no-push */
  1681   1681     int i, cnt;
  1682   1682     cnt = pOp->p1;
  1683   1683     if( cnt<0 ) cnt = -cnt;
  1684   1684     assert( &pTos[1-cnt] >= p->aStack );
  1685   1685     for(i=0; i<cnt && (pTos[1+i-cnt].flags & MEM_Null)==0; i++){}
  1686   1686     if( i>=cnt ) pc = pOp->p2-1;
  1687   1687     if( pOp->p1>0 ) popStack(&pTos, cnt);
................................................................................
  1694   1694   ** opcode must be called to set the number of fields in the table.
  1695   1695   **
  1696   1696   ** This opcode sets the number of columns for cursor P1 to P2.
  1697   1697   **
  1698   1698   ** If OP_KeyAsData is to be applied to cursor P1, it must be executed
  1699   1699   ** before this op-code.
  1700   1700   */
  1701         -case OP_SetNumColumns: {       /* no stack growth */
         1701  +case OP_SetNumColumns: {       /* no-push */
  1702   1702     Cursor *pC;
  1703   1703     assert( (pOp->p1)<p->nCursor );
  1704   1704     assert( p->apCsr[pOp->p1]!=0 );
  1705   1705     pC = p->apCsr[pOp->p1];
  1706   1706     pC->nField = pOp->p2;
  1707   1707     if( (!pC->keyAsData && pC->zeroData) || (pC->keyAsData && pC->intKey) ){
  1708   1708       rc = SQLITE_CORRUPT;
................................................................................
  2152   2152   ** entire transaction.  The statement transaction will automatically
  2153   2153   ** commit when the VDBE halts.
  2154   2154   **
  2155   2155   ** The statement is begun on the database file with index P1.  The main
  2156   2156   ** database file has an index of 0 and the file used for temporary tables
  2157   2157   ** has an index of 1.
  2158   2158   */
  2159         -case OP_Statement: {       /* no stack growth */
         2159  +case OP_Statement: {       /* no-push */
  2160   2160     int i = pOp->p1;
  2161   2161     Btree *pBt;
  2162   2162     if( i>=0 && i<db->nDb && (pBt = db->aDb[i].pBt) && !(db->autoCommit) ){
  2163   2163       assert( sqlite3BtreeIsInTrans(pBt) );
  2164   2164       if( !sqlite3BtreeIsInStmt(pBt) ){
  2165   2165         rc = sqlite3BtreeBeginStmt(pBt);
  2166   2166       }
................................................................................
  2172   2172   **
  2173   2173   ** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
  2174   2174   ** back any currently active btree transactions. If there are any active
  2175   2175   ** VMs (apart from this one), then the COMMIT or ROLLBACK statement fails.
  2176   2176   **
  2177   2177   ** This instruction causes the VM to halt.
  2178   2178   */
  2179         -case OP_AutoCommit: {       /* no stack growth */
         2179  +case OP_AutoCommit: {       /* no-push */
  2180   2180     u8 i = pOp->p1;
  2181   2181     u8 rollback = pOp->p2;
  2182   2182   
  2183   2183     assert( i==1 || i==0 );
  2184   2184     assert( i==1 || rollback==0 );
  2185   2185   
  2186   2186     assert( db->activeVdbeCnt>0 );  /* At least this one VM is active */
................................................................................
  2233   2233   ** underway.  Starting a write transaction also creates a rollback journal. A
  2234   2234   ** write transaction must be started before any changes can be made to the
  2235   2235   ** database.  If P2 is 2 or greater then an EXCLUSIVE lock is also obtained
  2236   2236   ** on the file.
  2237   2237   **
  2238   2238   ** If P2 is zero, then a read-lock is obtained on the database file.
  2239   2239   */
  2240         -case OP_Transaction: {       /* no stack growth */
         2240  +case OP_Transaction: {       /* no-push */
  2241   2241     int i = pOp->p1;
  2242   2242     Btree *pBt;
  2243   2243   
  2244   2244     assert( i>=0 && i<db->nDb );
  2245   2245     pBt = db->aDb[i].pBt;
  2246   2246   
  2247   2247     if( pBt ){
................................................................................
  2296   2296   ** P2==0 is the schema version.  P2==1 is the database format.
  2297   2297   ** P2==2 is the recommended pager cache size, and so forth.  P1==0 is
  2298   2298   ** the main database file and P1==1 is the database file used to store
  2299   2299   ** temporary tables.
  2300   2300   **
  2301   2301   ** A transaction must be started before executing this opcode.
  2302   2302   */
  2303         -case OP_SetCookie: {       /* no stack growth */
         2303  +case OP_SetCookie: {       /* no-push */
  2304   2304     Db *pDb;
  2305   2305     assert( pOp->p2<SQLITE_N_BTREE_META );
  2306   2306     assert( pOp->p1>=0 && pOp->p1<db->nDb );
  2307   2307     pDb = &db->aDb[pOp->p1];
  2308   2308     assert( pDb->pBt!=0 );
  2309   2309     assert( pTos>=p->aStack );
  2310   2310     Integerify(pTos);
................................................................................
  2332   2332   ** This operation is used to detect when that the cookie has changed
  2333   2333   ** and that the current process needs to reread the schema.
  2334   2334   **
  2335   2335   ** Either a transaction needs to have been started or an OP_Open needs
  2336   2336   ** to be executed (to establish a read lock) before this opcode is
  2337   2337   ** invoked.
  2338   2338   */
  2339         -case OP_VerifyCookie: {       /* no stack growth */
         2339  +case OP_VerifyCookie: {       /* no-push */
  2340   2340     int iMeta;
  2341   2341     Btree *pBt;
  2342   2342     assert( pOp->p1>=0 && pOp->p1<db->nDb );
  2343   2343     pBt = db->aDb[pOp->p1].pBt;
  2344   2344     if( pBt ){
  2345   2345       rc = sqlite3BtreeGetMeta(pBt, 1, (u32 *)&iMeta);
  2346   2346     }else{
................................................................................
  2392   2392   **
  2393   2393   ** This instruction works just like OpenRead except that it opens the cursor
  2394   2394   ** in read/write mode.  For a given table, there can be one or more read-only
  2395   2395   ** cursors or a single read/write cursor but not both.
  2396   2396   **
  2397   2397   ** See also OpenRead.
  2398   2398   */
  2399         -case OP_OpenRead:          /* no stack growth */
  2400         -case OP_OpenWrite: {       /* no stack growth */
         2399  +case OP_OpenRead:          /* no-push */
         2400  +case OP_OpenWrite: {       /* no-push */
  2401   2401     int i = pOp->p1;
  2402   2402     int p2 = pOp->p2;
  2403   2403     int wrFlag;
  2404   2404     Btree *pX;
  2405   2405     int iDb;
  2406   2406     Cursor *pCur;
  2407   2407     
................................................................................
  2481   2481   ** This opcode is used for tables that exist for the duration of a single
  2482   2482   ** SQL statement only.  Tables created using CREATE TEMPORARY TABLE
  2483   2483   ** are opened using OP_OpenRead or OP_OpenWrite.  "Temporary" in the
  2484   2484   ** context of this opcode means for the duration of a single SQL statement
  2485   2485   ** whereas "Temporary" in the context of CREATE TABLE means for the duration
  2486   2486   ** of the connection to the database.  Same word; different meanings.
  2487   2487   */
  2488         -case OP_OpenTemp: {       /* no stack growth */
         2488  +case OP_OpenTemp: {       /* no-push */
  2489   2489     int i = pOp->p1;
  2490   2490     Cursor *pCx;
  2491   2491     assert( i>=0 );
  2492   2492     pCx = allocateCursor(p, i);
  2493   2493     if( pCx==0 ) goto no_mem;
  2494   2494     pCx->nullRow = 1;
  2495   2495     rc = sqlite3BtreeFactory(db, 0, 1, TEMP_PAGES, &pCx->pBt);
................................................................................
  2530   2530   ** row of data.  Any attempt to write a second row of data causes the
  2531   2531   ** first row to be deleted.  All data is deleted when the cursor is
  2532   2532   ** closed.
  2533   2533   **
  2534   2534   ** A pseudo-table created by this opcode is useful for holding the
  2535   2535   ** NEW or OLD tables in a trigger.
  2536   2536   */
  2537         -case OP_OpenPseudo: {       /* no stack growth */
         2537  +case OP_OpenPseudo: {       /* no-push */
  2538   2538     int i = pOp->p1;
  2539   2539     Cursor *pCx;
  2540   2540     assert( i>=0 );
  2541   2541     pCx = allocateCursor(p, i);
  2542   2542     if( pCx==0 ) goto no_mem;
  2543   2543     pCx->nullRow = 1;
  2544   2544     pCx->pseudoTable = 1;
................................................................................
  2548   2548   #endif
  2549   2549   
  2550   2550   /* Opcode: Close P1 * *
  2551   2551   **
  2552   2552   ** Close a cursor previously opened as P1.  If P1 is not
  2553   2553   ** currently open, this instruction is a no-op.
  2554   2554   */
  2555         -case OP_Close: {       /* no stack growth */
         2555  +case OP_Close: {       /* no-push */
  2556   2556     int i = pOp->p1;
  2557   2557     if( i>=0 && i<p->nCursor ){
  2558   2558       sqlite3VdbeFreeCursor(p->apCsr[i]);
  2559   2559       p->apCsr[i] = 0;
  2560   2560     }
  2561   2561     break;
  2562   2562   }
................................................................................
  2597   2597   ** cursor P1 so that it points to the largest entry that is less than
  2598   2598   ** or equal to the key that was popped from the stack.
  2599   2599   ** If there are no records less than or eqal to the key and P2 is not zero,
  2600   2600   ** then jump to P2.
  2601   2601   **
  2602   2602   ** See also: Found, NotFound, Distinct, MoveGt, MoveGe, MoveLt
  2603   2603   */
  2604         -case OP_MoveLt:         /* no stack growth */
  2605         -case OP_MoveLe:         /* no stack growth */
  2606         -case OP_MoveGe:         /* no stack growth */
  2607         -case OP_MoveGt: {       /* no stack growth */
         2604  +case OP_MoveLt:         /* no-push */
         2605  +case OP_MoveLe:         /* no-push */
         2606  +case OP_MoveGe:         /* no-push */
         2607  +case OP_MoveGt: {       /* no-push */
  2608   2608     int i = pOp->p1;
  2609   2609     Cursor *pC;
  2610   2610   
  2611   2611     assert( pTos>=p->aStack );
  2612   2612     assert( i>=0 && i<p->nCursor );
  2613   2613     pC = p->apCsr[i];
  2614   2614     assert( pC!=0 );
................................................................................
  2709   2709   ** record if it exists.  The key is popped from the stack.
  2710   2710   **
  2711   2711   ** The difference between this operation and Distinct is that
  2712   2712   ** Distinct does not pop the key from the stack.
  2713   2713   **
  2714   2714   ** See also: Distinct, Found, MoveTo, NotExists, IsUnique
  2715   2715   */
  2716         -case OP_Distinct:       /* no stack growth */
  2717         -case OP_NotFound:       /* no stack growth */
  2718         -case OP_Found: {        /* no stack growth */
         2716  +case OP_Distinct:       /* no-push */
         2717  +case OP_NotFound:       /* no-push */
         2718  +case OP_Found: {        /* no-push */
  2719   2719     int i = pOp->p1;
  2720   2720     int alreadyExists = 0;
  2721   2721     Cursor *pC;
  2722   2722     assert( pTos>=p->aStack );
  2723   2723     assert( i>=0 && i<p->nCursor );
  2724   2724     assert( p->apCsr[i]!=0 );
  2725   2725     if( (pC = p->apCsr[i])->pCursor!=0 ){
................................................................................
  2760   2760   ** jump to P2.  If any entry does exist where the index string
  2761   2761   ** matches K but the record number is not R, then the record
  2762   2762   ** number for that entry is pushed onto the stack and control
  2763   2763   ** falls through to the next instruction.
  2764   2764   **
  2765   2765   ** See also: Distinct, NotFound, NotExists, Found
  2766   2766   */
  2767         -case OP_IsUnique: {        /* no stack growth */
         2767  +case OP_IsUnique: {        /* no-push */
  2768   2768     int i = pOp->p1;
  2769   2769     Mem *pNos = &pTos[-1];
  2770   2770     Cursor *pCx;
  2771   2771     BtCursor *pCrsr;
  2772   2772     i64 R;
  2773   2773   
  2774   2774     /* Pop the value R off the top of the stack
................................................................................
  2854   2854   **
  2855   2855   ** The difference between this operation and NotFound is that this
  2856   2856   ** operation assumes the key is an integer and NotFound assumes it
  2857   2857   ** is a string.
  2858   2858   **
  2859   2859   ** See also: Distinct, Found, MoveTo, NotFound, IsUnique
  2860   2860   */
  2861         -case OP_NotExists: {        /* no stack growth */
         2861  +case OP_NotExists: {        /* no-push */
  2862   2862     int i = pOp->p1;
  2863   2863     Cursor *pC;
  2864   2864     BtCursor *pCrsr;
  2865   2865     assert( pTos>=p->aStack );
  2866   2866     assert( i>=0 && i<p->nCursor );
  2867   2867     assert( p->apCsr[i]!=0 );
  2868   2868     if( (pCrsr = (pC = p->apCsr[i])->pCursor)!=0 ){
................................................................................
  3057   3057   ** created if it doesn't already exist or the data for an existing
  3058   3058   ** entry is overwritten.  The data is the value on the top of the
  3059   3059   ** stack.  The key is the next value down on the stack.  The key must
  3060   3060   ** be a string.  The stack is popped twice by this instruction.
  3061   3061   **
  3062   3062   ** P1 may not be a pseudo-table opened using the OpenPseudo opcode.
  3063   3063   */
  3064         -case OP_PutIntKey:          /* no stack growth */
  3065         -case OP_PutStrKey: {        /* no stack growth */
         3064  +case OP_PutIntKey:          /* no-push */
         3065  +case OP_PutStrKey: {        /* no-push */
  3066   3066     Mem *pNos = &pTos[-1];
  3067   3067     int i = pOp->p1;
  3068   3068     Cursor *pC;
  3069   3069     assert( pNos>=p->aStack );
  3070   3070     assert( i>=0 && i<p->nCursor );
  3071   3071     assert( p->apCsr[i]!=0 );
  3072   3072     if( ((pC = p->apCsr[i])->pCursor!=0 || pC->pseudoTable) ){
................................................................................
  3152   3152   ** a record from within an Next loop.
  3153   3153   **
  3154   3154   ** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is
  3155   3155   ** incremented (otherwise not).
  3156   3156   **
  3157   3157   ** If P1 is a pseudo-table, then this instruction is a no-op.
  3158   3158   */
  3159         -case OP_Delete: {        /* no stack growth */
         3159  +case OP_Delete: {        /* no-push */
  3160   3160     int i = pOp->p1;
  3161   3161     Cursor *pC;
  3162   3162     assert( i>=0 && i<p->nCursor );
  3163   3163     pC = p->apCsr[i];
  3164   3164     assert( pC!=0 );
  3165   3165     if( pC->pCursor!=0 ){
  3166   3166       rc = sqlite3VdbeCursorMoveto(pC);
................................................................................
  3176   3176   /* Opcode: ResetCount P1 * *
  3177   3177   **
  3178   3178   ** This opcode resets the VMs internal change counter to 0. If P1 is true,
  3179   3179   ** then the value of the change counter is copied to the database handle
  3180   3180   ** change counter (returned by subsequent calls to sqlite3_changes())
  3181   3181   ** before it is reset. This is used by trigger programs.
  3182   3182   */
  3183         -case OP_ResetCount: {        /* no stack growth */
         3183  +case OP_ResetCount: {        /* no-push */
  3184   3184     if( pOp->p1 ){
  3185   3185       sqlite3VdbeSetChanges(db, p->nChange);
  3186   3186     }
  3187   3187     p->nChange = 0;
  3188   3188     break;
  3189   3189   }
  3190   3190   
................................................................................
  3191   3191   /* Opcode: KeyAsData P1 P2 *
  3192   3192   **
  3193   3193   ** Turn the key-as-data mode for cursor P1 either on (if P2==1) or
  3194   3194   ** off (if P2==0).  In key-as-data mode, the OP_Column opcode pulls
  3195   3195   ** data off of the key rather than the data.  This is used for
  3196   3196   ** processing compound selects.
  3197   3197   */
  3198         -case OP_KeyAsData: {        /* no stack growth */
         3198  +case OP_KeyAsData: {        /* no-push */
  3199   3199     int i = pOp->p1;
  3200   3200     Cursor *pC;
  3201   3201     assert( i>=0 && i<p->nCursor );
  3202   3202     pC = p->apCsr[i];
  3203   3203     assert( pC!=0 );
  3204   3204     pC->keyAsData = pOp->p2;
  3205   3205     break;
................................................................................
  3367   3367   
  3368   3368   /* Opcode: NullRow P1 * *
  3369   3369   **
  3370   3370   ** Move the cursor P1 to a null row.  Any OP_Column operations
  3371   3371   ** that occur while the cursor is on the null row will always push 
  3372   3372   ** a NULL onto the stack.
  3373   3373   */
  3374         -case OP_NullRow: {        /* no stack growth */
         3374  +case OP_NullRow: {        /* no-push */
  3375   3375     int i = pOp->p1;
  3376   3376     Cursor *pC;
  3377   3377   
  3378   3378     assert( i>=0 && i<p->nCursor );
  3379   3379     pC = p->apCsr[i];
  3380   3380     assert( pC!=0 );
  3381   3381     pC->nullRow = 1;
................................................................................
  3387   3387   **
  3388   3388   ** The next use of the Recno or Column or Next instruction for P1 
  3389   3389   ** will refer to the last entry in the database table or index.
  3390   3390   ** If the table or index is empty and P2>0, then jump immediately to P2.
  3391   3391   ** If P2 is 0 or if the table or index is not empty, fall through
  3392   3392   ** to the following instruction.
  3393   3393   */
  3394         -case OP_Last: {        /* no stack growth */
         3394  +case OP_Last: {        /* no-push */
  3395   3395     int i = pOp->p1;
  3396   3396     Cursor *pC;
  3397   3397     BtCursor *pCrsr;
  3398   3398   
  3399   3399     assert( i>=0 && i<p->nCursor );
  3400   3400     pC = p->apCsr[i];
  3401   3401     assert( pC!=0 );
................................................................................
  3418   3418   **
  3419   3419   ** The next use of the Recno or Column or Next instruction for P1 
  3420   3420   ** will refer to the first entry in the database table or index.
  3421   3421   ** If the table or index is empty and P2>0, then jump immediately to P2.
  3422   3422   ** If P2 is 0 or if the table or index is not empty, fall through
  3423   3423   ** to the following instruction.
  3424   3424   */
  3425         -case OP_Rewind: {        /* no stack growth */
         3425  +case OP_Rewind: {        /* no-push */
  3426   3426     int i = pOp->p1;
  3427   3427     Cursor *pC;
  3428   3428     BtCursor *pCrsr;
  3429   3429     int res;
  3430   3430   
  3431   3431     assert( i>=0 && i<p->nCursor );
  3432   3432     pC = p->apCsr[i];
................................................................................
  3458   3458   /* Opcode: Prev P1 P2 *
  3459   3459   **
  3460   3460   ** Back up cursor P1 so that it points to the previous key/data pair in its
  3461   3461   ** table or index.  If there is no previous key/value pairs then fall through
  3462   3462   ** to the following instruction.  But if the cursor backup was successful,
  3463   3463   ** jump immediately to P2.
  3464   3464   */
  3465         -case OP_Prev:          /* no stack growth */
  3466         -case OP_Next: {        /* no stack growth */
         3465  +case OP_Prev:          /* no-push */
         3466  +case OP_Next: {        /* no-push */
  3467   3467     Cursor *pC;
  3468   3468     BtCursor *pCrsr;
  3469   3469   
  3470   3470     CHECK_FOR_INTERRUPT;
  3471   3471     assert( pOp->p1>=0 && pOp->p1<p->nCursor );
  3472   3472     pC = p->apCsr[pOp->p1];
  3473   3473     assert( pC!=0 );
................................................................................
  3500   3500   ** index P1.  Data for the entry is nil.
  3501   3501   **
  3502   3502   ** If P2==1, then the key must be unique.  If the key is not unique,
  3503   3503   ** the program aborts with a SQLITE_CONSTRAINT error and the database
  3504   3504   ** is rolled back.  If P3 is not null, then it becomes part of the
  3505   3505   ** error message returned with the SQLITE_CONSTRAINT.
  3506   3506   */
  3507         -case OP_IdxPut: {        /* no stack growth */
         3507  +case OP_IdxPut: {        /* no-push */
  3508   3508     int i = pOp->p1;
  3509   3509     Cursor *pC;
  3510   3510     BtCursor *pCrsr;
  3511   3511     assert( pTos>=p->aStack );
  3512   3512     assert( i>=0 && i<p->nCursor );
  3513   3513     assert( p->apCsr[i]!=0 );
  3514   3514     assert( pTos->flags & MEM_Blob );
................................................................................
  3552   3552   }
  3553   3553   
  3554   3554   /* Opcode: IdxDelete P1 * *
  3555   3555   **
  3556   3556   ** The top of the stack is an index key built using the MakeIdxKey opcode.
  3557   3557   ** This opcode removes that entry from the index.
  3558   3558   */
  3559         -case OP_IdxDelete: {        /* no stack growth */
         3559  +case OP_IdxDelete: {        /* no-push */
  3560   3560     int i = pOp->p1;
  3561   3561     Cursor *pC;
  3562   3562     BtCursor *pCrsr;
  3563   3563     assert( pTos>=p->aStack );
  3564   3564     assert( pTos->flags & MEM_Blob );
  3565   3565     assert( i>=0 && i<p->nCursor );
  3566   3566     assert( p->apCsr[i]!=0 );
................................................................................
  3654   3654   ** In either case, the stack is popped once.
  3655   3655   **
  3656   3656   ** If P3 is the "+" string (or any other non-NULL string) then the
  3657   3657   ** index taken from the top of the stack is temporarily increased by
  3658   3658   ** an epsilon prior to the comparison.  This makes the opcode work
  3659   3659   ** like IdxLE.
  3660   3660   */
  3661         -case OP_IdxLT:          /* no stack growth */
  3662         -case OP_IdxGT:          /* no stack growth */
  3663         -case OP_IdxGE: {        /* no stack growth */
         3661  +case OP_IdxLT:          /* no-push */
         3662  +case OP_IdxGT:          /* no-push */
         3663  +case OP_IdxGE: {        /* no-push */
  3664   3664     int i= pOp->p1;
  3665   3665     BtCursor *pCrsr;
  3666   3666     Cursor *pC;
  3667   3667   
  3668   3668     assert( i>=0 && i<p->nCursor );
  3669   3669     assert( p->apCsr[i]!=0 );
  3670   3670     assert( pTos>=p->aStack );
................................................................................
  3700   3700   ** The top of the stack contains an index entry such as might be generated
  3701   3701   ** by the MakeIdxKey opcode.  This routine looks at the first P1 fields of
  3702   3702   ** that key.  If any of the first P1 fields are NULL, then a jump is made
  3703   3703   ** to address P2.  Otherwise we fall straight through.
  3704   3704   **
  3705   3705   ** The index entry is always popped from the stack.
  3706   3706   */
  3707         -case OP_IdxIsNull: {        /* no stack growth */
         3707  +case OP_IdxIsNull: {        /* no-push */
  3708   3708     int i = pOp->p1;
  3709   3709     int k, n;
  3710   3710     const char *z;
  3711   3711     u32 serial_type;
  3712   3712   
  3713   3713     assert( pTos>=p->aStack );
  3714   3714     assert( pTos->flags & MEM_Blob );
................................................................................
  3774   3774   **
  3775   3775   ** The table being clear is in the main database file if P2==0.  If
  3776   3776   ** P2==1 then the table to be clear is in the auxiliary database file
  3777   3777   ** that is used to store tables create using CREATE TEMPORARY TABLE.
  3778   3778   **
  3779   3779   ** See also: Destroy
  3780   3780   */
  3781         -case OP_Clear: {        /* no stack growth */
         3781  +case OP_Clear: {        /* no-push */
  3782   3782     rc = sqlite3BtreeClearTable(db->aDb[pOp->p2].pBt, pOp->p1);
  3783   3783     break;
  3784   3784   }
  3785   3785   
  3786   3786   /* Opcode: CreateTable P1 * *
  3787   3787   **
  3788   3788   ** Allocate a new table in the main database file if P2==0 or in the
................................................................................
  3832   3832   **
  3833   3833   ** Read and parse all entries from the SQLITE_MASTER table of database P1
  3834   3834   ** that match the WHERE clause P3.
  3835   3835   **
  3836   3836   ** This opcode invokes the parser to create a new virtual machine,
  3837   3837   ** then runs the new virtual machine.  It is thus a reentrant opcode.
  3838   3838   */
  3839         -case OP_ParseSchema: {        /* no stack growth */
         3839  +case OP_ParseSchema: {        /* no-push */
  3840   3840     char *zSql;
  3841   3841     int iDb = pOp->p1;
  3842   3842     const char *zMaster;
  3843   3843     InitData initData;
  3844   3844   
  3845   3845     assert( iDb>=0 && iDb<db->nDb );
  3846   3846     if( !DbHasProperty(db, iDb, DB_SchemaLoaded) ) break;
................................................................................
  3864   3864   /* Opcode: DropTable P1 * P3
  3865   3865   **
  3866   3866   ** Remove the internal (in-memory) data structures that describe
  3867   3867   ** the table named P3 in database P1.  This is called after a table
  3868   3868   ** is dropped in order to keep the internal representation of the
  3869   3869   ** schema consistent with what is on disk.
  3870   3870   */
  3871         -case OP_DropTable: {        /* no stack growth */
         3871  +case OP_DropTable: {        /* no-push */
  3872   3872     sqlite3UnlinkAndDeleteTable(db, pOp->p1, pOp->p3);
  3873   3873     break;
  3874   3874   }
  3875   3875   
  3876   3876   /* Opcode: DropIndex P1 * P3
  3877   3877   **
  3878   3878   ** Remove the internal (in-memory) data structures that describe
  3879   3879   ** the index named P3 in database P1.  This is called after an index
  3880   3880   ** is dropped in order to keep the internal representation of the
  3881   3881   ** schema consistent with what is on disk.
  3882   3882   */
  3883         -case OP_DropIndex: {        /* no stack growth */
         3883  +case OP_DropIndex: {        /* no-push */
  3884   3884     sqlite3UnlinkAndDeleteIndex(db, pOp->p1, pOp->p3);
  3885   3885     break;
  3886   3886   }
  3887   3887   
  3888   3888   /* Opcode: DropTrigger P1 * P3
  3889   3889   **
  3890   3890   ** Remove the internal (in-memory) data structures that describe
  3891   3891   ** the trigger named P3 in database P1.  This is called after a trigger
  3892   3892   ** is dropped in order to keep the internal representation of the
  3893   3893   ** schema consistent with what is on disk.
  3894   3894   */
  3895         -case OP_DropTrigger: {        /* no stack growth */
         3895  +case OP_DropTrigger: {        /* no-push */
  3896   3896     sqlite3UnlinkAndDeleteTrigger(db, pOp->p1, pOp->p3);
  3897   3897     break;
  3898   3898   }
  3899   3899   
  3900   3900   
  3901   3901   #ifndef SQLITE_OMIT_INTEGRITY_CHECK
  3902   3902   /* Opcode: IntegrityCk * P2 *
................................................................................
  3953   3953   #endif /* SQLITE_OMIT_INTEGRITY_CHECK */
  3954   3954   
  3955   3955   /* Opcode: ListWrite * * *
  3956   3956   **
  3957   3957   ** Write the integer on the top of the stack
  3958   3958   ** into the temporary storage list.
  3959   3959   */
  3960         -case OP_ListWrite: {        /* no stack growth */
         3960  +case OP_ListWrite: {        /* no-push */
  3961   3961     Keylist *pKeylist;
  3962   3962     assert( pTos>=p->aStack );
  3963   3963     pKeylist = p->pList;
  3964   3964     if( pKeylist==0 || pKeylist->nUsed>=pKeylist->nKey ){
  3965   3965       pKeylist = sqliteMallocRaw( sizeof(Keylist)+999*sizeof(pKeylist->aKey[0]) );
  3966   3966       if( pKeylist==0 ) goto no_mem;
  3967   3967       pKeylist->nKey = 1000;
................................................................................
  3977   3977     break;
  3978   3978   }
  3979   3979   
  3980   3980   /* Opcode: ListRewind * * *
  3981   3981   **
  3982   3982   ** Rewind the temporary buffer back to the beginning.
  3983   3983   */
  3984         -case OP_ListRewind: {        /* no stack growth */
         3984  +case OP_ListRewind: {        /* no-push */
  3985   3985     /* What this opcode codes, really, is reverse the order of the
  3986   3986     ** linked list of Keylist structures so that they are read out
  3987   3987     ** in the same order that they were read in. */
  3988   3988     Keylist *pRev, *pTop;
  3989   3989     pRev = 0;
  3990   3990     while( p->pList ){
  3991   3991       pTop = p->pList;
................................................................................
  4024   4024     break;
  4025   4025   }
  4026   4026   
  4027   4027   /* Opcode: ListReset * * *
  4028   4028   **
  4029   4029   ** Reset the temporary storage buffer so that it holds nothing.
  4030   4030   */
  4031         -case OP_ListReset: {        /* no stack growth */
         4031  +case OP_ListReset: {        /* no-push */
  4032   4032     if( p->pList ){
  4033   4033       sqlite3VdbeKeylistFree(p->pList);
  4034   4034       p->pList = 0;
  4035   4035     }
  4036   4036     break;
  4037   4037   }
  4038   4038   
................................................................................
  4039   4039   #ifndef SQLITE_OMIT_SUBQUERY
  4040   4040   /* Opcode: AggContextPush * * * 
  4041   4041   **
  4042   4042   ** Save the state of the current aggregator. It is restored an 
  4043   4043   ** AggContextPop opcode.
  4044   4044   ** 
  4045   4045   */
  4046         -case OP_AggContextPush: {        /* no stack growth */
         4046  +case OP_AggContextPush: {        /* no-push */
  4047   4047     p->pAgg++;
  4048   4048     assert( p->pAgg<&p->apAgg[p->nAgg] );
  4049   4049     break;
  4050   4050   }
  4051   4051   
  4052   4052   /* Opcode: AggContextPop * * *
  4053   4053   **
  4054   4054   ** Restore the aggregator to the state it was in when AggContextPush
  4055   4055   ** was last called. Any data in the current aggregator is deleted.
  4056   4056   */
  4057         -case OP_AggContextPop: {        /* no stack growth */
         4057  +case OP_AggContextPop: {        /* no-push */
  4058   4058     p->pAgg--;
  4059   4059     assert( p->pAgg>=p->apAgg );
  4060   4060     break;
  4061   4061   }
  4062   4062   #endif
  4063   4063   
  4064   4064   #ifndef SQLITE_OMIT_TRIGGER
  4065   4065   /* Opcode: ContextPush * * * 
  4066   4066   **
  4067   4067   ** Save the current Vdbe context such that it can be restored by a ContextPop
  4068   4068   ** opcode. The context stores the last insert row id, the last statement change
  4069   4069   ** count, and the current statement change count.
  4070   4070   */
  4071         -case OP_ContextPush: {        /* no stack growth */
         4071  +case OP_ContextPush: {        /* no-push */
  4072   4072     int i = p->contextStackTop++;
  4073   4073     Context *pContext;
  4074   4074   
  4075   4075     assert( i>=0 );
  4076   4076     /* FIX ME: This should be allocated as part of the vdbe at compile-time */
  4077   4077     if( i>=p->contextStackDepth ){
  4078   4078       p->contextStackDepth = i+1;
................................................................................
  4089   4089   
  4090   4090   /* Opcode: ContextPop * * * 
  4091   4091   **
  4092   4092   ** Restore the Vdbe context to the state it was in when contextPush was last
  4093   4093   ** executed. The context stores the last insert row id, the last statement
  4094   4094   ** change count, and the current statement change count.
  4095   4095   */
  4096         -case OP_ContextPop: {        /* no stack growth */
         4096  +case OP_ContextPop: {        /* no-push */
  4097   4097     Context *pContext = &p->contextStack[--p->contextStackTop];
  4098   4098     assert( p->contextStackTop>=0 );
  4099   4099     db->lastRowid = pContext->lastRowid;
  4100   4100     p->nChange = pContext->nChange;
  4101   4101     sqlite3VdbeKeylistFree(p->pList);
  4102   4102     p->pList = pContext->pList;
  4103   4103     break;
................................................................................
  4106   4106   
  4107   4107   /* Opcode: SortPut * * *
  4108   4108   **
  4109   4109   ** The TOS is the key and the NOS is the data.  Pop both from the stack
  4110   4110   ** and put them on the sorter.  The key and data should have been
  4111   4111   ** made using the MakeRecord opcode.
  4112   4112   */
  4113         -case OP_SortPut: {        /* no stack growth */
         4113  +case OP_SortPut: {        /* no-push */
  4114   4114     Mem *pNos = &pTos[-1];
  4115   4115     Sorter *pSorter;
  4116   4116     assert( pNos>=p->aStack );
  4117   4117     if( Dynamicify(pTos, db->enc) ) goto no_mem;
  4118   4118     pSorter = sqliteMallocRaw( sizeof(Sorter) );
  4119   4119     if( pSorter==0 ) goto no_mem;
  4120   4120     pSorter->pNext = p->pSort;
................................................................................
  4130   4130   
  4131   4131   /* Opcode: Sort * * P3
  4132   4132   **
  4133   4133   ** Sort all elements on the sorter.  The algorithm is a
  4134   4134   ** mergesort.  The P3 argument is a pointer to a KeyInfo structure
  4135   4135   ** that describes the keys to be sorted.
  4136   4136   */
  4137         -case OP_Sort: {        /* no stack growth */
         4137  +case OP_Sort: {        /* no-push */
  4138   4138     int i;
  4139   4139     KeyInfo *pKeyInfo = (KeyInfo*)pOp->p3;
  4140   4140     Sorter *pElem;
  4141   4141     Sorter *apSorter[NSORT];
  4142   4142     sqlite3_sort_count++;
  4143   4143     pKeyInfo->enc = p->db->enc;
  4144   4144     for(i=0; i<NSORT; i++){
................................................................................
  4192   4192     break;
  4193   4193   }
  4194   4194   
  4195   4195   /* Opcode: SortReset * * *
  4196   4196   **
  4197   4197   ** Remove any elements that remain on the sorter.
  4198   4198   */
  4199         -case OP_SortReset: {        /* no stack growth */
         4199  +case OP_SortReset: {        /* no-push */
  4200   4200     sqlite3VdbeSorterReset(p);
  4201   4201     break;
  4202   4202   }
  4203   4203   
  4204   4204   /* Opcode: MemStore P1 P2 *
  4205   4205   **
  4206   4206   ** Write the top of the stack into memory location P1.
................................................................................
  4207   4207   ** P1 should be a small integer since space is allocated
  4208   4208   ** for all memory locations between 0 and P1 inclusive.
  4209   4209   **
  4210   4210   ** After the data is stored in the memory location, the
  4211   4211   ** stack is popped once if P2 is 1.  If P2 is zero, then
  4212   4212   ** the original data remains on the stack.
  4213   4213   */
  4214         -case OP_MemStore: {        /* no stack growth */
         4214  +case OP_MemStore: {        /* no-push */
  4215   4215     assert( pTos>=p->aStack );
  4216   4216     assert( pOp->p1>=0 && pOp->p1<p->nMem );
  4217   4217     rc = sqlite3VdbeMemMove(&p->aMem[pOp->p1], pTos);
  4218   4218     pTos--;
  4219   4219   
  4220   4220     /* If P2 is 0 then fall thru to the next opcode, OP_MemLoad, that will
  4221   4221     ** restore the top of the stack to its original value.
................................................................................
  4246   4246   **
  4247   4247   ** Set the value of memory cell P1 to the maximum of its current value
  4248   4248   ** and the value on the top of the stack.  The stack is unchanged.
  4249   4249   **
  4250   4250   ** This instruction throws an error if the memory cell is not initially
  4251   4251   ** an integer.
  4252   4252   */
  4253         -case OP_MemMax: {        /* no stack growth */
         4253  +case OP_MemMax: {        /* no-push */
  4254   4254     int i = pOp->p1;
  4255   4255     Mem *pMem;
  4256   4256     assert( pTos>=p->aStack );
  4257   4257     assert( i>=0 && i<p->nMem );
  4258   4258     pMem = &p->aMem[i];
  4259   4259     Integerify(pMem);
  4260   4260     Integerify(pTos);
................................................................................
  4270   4270   ** Increment the integer valued memory cell P1 by 1.  If P2 is not zero
  4271   4271   ** and the result after the increment is exactly 1, then jump
  4272   4272   ** to P2.
  4273   4273   **
  4274   4274   ** This instruction throws an error if the memory cell is not initially
  4275   4275   ** an integer.
  4276   4276   */
  4277         -case OP_MemIncr: {        /* no stack growth */
         4277  +case OP_MemIncr: {        /* no-push */
  4278   4278     int i = pOp->p1;
  4279   4279     Mem *pMem;
  4280   4280     assert( i>=0 && i<p->nMem );
  4281   4281     pMem = &p->aMem[i];
  4282   4282     assert( pMem->flags==MEM_Int );
  4283   4283     pMem->i++;
  4284   4284     if( pOp->p2>0 && pMem->i==1 ){
................................................................................
  4288   4288   }
  4289   4289   
  4290   4290   /* Opcode: IfMemPos P1 P2 *
  4291   4291   **
  4292   4292   ** If the value of memory cell P1 is 1 or greater, jump to P2. This
  4293   4293   ** opcode assumes that memory cell P1 holds an integer value.
  4294   4294   */
  4295         -case OP_IfMemPos: {        /* no stack growth */
         4295  +case OP_IfMemPos: {        /* no-push */
  4296   4296     int i = pOp->p1;
  4297   4297     Mem *pMem;
  4298   4298     assert( i>=0 && i<p->nMem );
  4299   4299     pMem = &p->aMem[i];
  4300   4300     assert( pMem->flags==MEM_Int );
  4301   4301     if( pMem->i>0 ){
  4302   4302        pc = pOp->p2 - 1;
................................................................................
  4310   4310   ** data. Future aggregator elements will contain P2 values each and be sorted
  4311   4311   ** using the KeyInfo structure pointed to by P3.
  4312   4312   **
  4313   4313   ** If P1 is non-zero, then only a single aggregator row is available (i.e.
  4314   4314   ** there is no GROUP BY expression). In this case it is illegal to invoke
  4315   4315   ** OP_AggFocus.
  4316   4316   */
  4317         -case OP_AggReset: {        /* no stack growth */
         4317  +case OP_AggReset: {        /* no-push */
  4318   4318     assert( !pOp->p3 || pOp->p3type==P3_KEYINFO );
  4319   4319     if( pOp->p1 ){
  4320   4320       rc = sqlite3VdbeAggReset(0, p->pAgg, (KeyInfo *)pOp->p3);
  4321   4321       p->pAgg->nMem = pOp->p2;    /* Agg.nMem is used by AggInsert() */
  4322   4322       rc = AggInsert(p->pAgg, 0, 0);
  4323   4323     }else{
  4324   4324       rc = sqlite3VdbeAggReset(db, p->pAgg, (KeyInfo *)pOp->p3);
................................................................................
  4334   4334   
  4335   4335   /* Opcode: AggInit * P2 P3
  4336   4336   **
  4337   4337   ** Initialize the function parameters for an aggregate function.
  4338   4338   ** The aggregate will operate out of aggregate column P2.
  4339   4339   ** P3 is a pointer to the FuncDef structure for the function.
  4340   4340   */
  4341         -case OP_AggInit: {        /* no stack growth */
         4341  +case OP_AggInit: {        /* no-push */
  4342   4342     int i = pOp->p2;
  4343   4343     assert( i>=0 && i<p->pAgg->nMem );
  4344   4344     p->pAgg->apFunc[i] = (FuncDef*)pOp->p3;
  4345   4345     break;
  4346   4346   }
  4347   4347   
  4348   4348   /* Opcode: AggFunc * P2 P3
................................................................................
  4352   4352   ** structure that specifies the function.
  4353   4353   **
  4354   4354   ** The top of the stack must be an integer which is the index of
  4355   4355   ** the aggregate column that corresponds to this aggregate function.
  4356   4356   ** Ideally, this index would be another parameter, but there are
  4357   4357   ** no free parameters left.  The integer is popped from the stack.
  4358   4358   */
  4359         -case OP_AggFunc: {        /* no stack growth */
         4359  +case OP_AggFunc: {        /* no-push */
  4360   4360     int n = pOp->p2;
  4361   4361     int i;
  4362   4362     Mem *pMem, *pRec;
  4363   4363     sqlite3_context ctx;
  4364   4364     sqlite3_value **apVal;
  4365   4365   
  4366   4366     assert( n>=0 );
................................................................................
  4410   4410   **
  4411   4411   ** The order of aggregator opcodes is important.  The order is:
  4412   4412   ** AggReset AggFocus AggNext.  In other words, you must execute
  4413   4413   ** AggReset first, then zero or more AggFocus operations, then
  4414   4414   ** zero or more AggNext operations.  You must not execute an AggFocus
  4415   4415   ** in between an AggNext and an AggReset.
  4416   4416   */
  4417         -case OP_AggFocus: {        /* no stack growth */
         4417  +case OP_AggFocus: {        /* no-push */
  4418   4418     char *zKey;
  4419   4419     int nKey;
  4420   4420     int res;
  4421   4421     assert( pTos>=p->aStack );
  4422   4422     Stringify(pTos, db->enc);
  4423   4423     zKey = pTos->z;
  4424   4424     nKey = pTos->n;
................................................................................
  4444   4444   }
  4445   4445   
  4446   4446   /* Opcode: AggSet * P2 *
  4447   4447   **
  4448   4448   ** Move the top of the stack into the P2-th field of the current
  4449   4449   ** aggregate.  String values are duplicated into new memory.
  4450   4450   */
  4451         -case OP_AggSet: {        /* no stack growth */
         4451  +case OP_AggSet: {        /* no-push */
  4452   4452     AggElem *pFocus;
  4453   4453     int i = pOp->p2;
  4454   4454     pFocus = p->pAgg->pCurrent;
  4455   4455     assert( pTos>=p->aStack );
  4456   4456     if( pFocus==0 ) goto no_mem;
  4457   4457     assert( i>=0 && i<p->pAgg->nMem );
  4458   4458     rc = sqlite3VdbeMemMove(&pFocus->aMem[i], pTos);
................................................................................
  4509   4509   **
  4510   4510   ** The order of aggregator opcodes is important.  The order is:
  4511   4511   ** AggReset AggFocus AggNext.  In other words, you must execute
  4512   4512   ** AggReset first, then zero or more AggFocus operations, then
  4513   4513   ** zero or more AggNext operations.  You must not execute an AggFocus
  4514   4514   ** in between an AggNext and an AggReset.
  4515   4515   */
  4516         -case OP_AggNext: {        /* no stack growth */
         4516  +case OP_AggNext: {        /* no-push */
  4517   4517     int res;
  4518   4518     assert( rc==SQLITE_OK );
  4519   4519     CHECK_FOR_INTERRUPT;
  4520   4520     if( p->pAgg->searching==0 ){
  4521   4521       p->pAgg->searching = 1;
  4522   4522       if( p->pAgg->pCsr ){
  4523   4523         rc = sqlite3BtreeFirst(p->pAgg->pCsr, &res);
................................................................................
  4570   4570   
  4571   4571   /* Opcode: Vacuum * * *
  4572   4572   **
  4573   4573   ** Vacuum the entire database.  This opcode will cause other virtual
  4574   4574   ** machines to be created and run.  It may not be called from within
  4575   4575   ** a transaction.
  4576   4576   */
  4577         -case OP_Vacuum: {        /* no stack growth */
         4577  +case OP_Vacuum: {        /* no-push */
  4578   4578     if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; 
  4579   4579     rc = sqlite3RunVacuum(&p->zErrMsg, db);
  4580   4580     if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse;
  4581   4581     break;
  4582   4582   }
  4583   4583   
  4584   4584   /* Opcode: Expire P1 * *
................................................................................
  4586   4586   ** Cause precompiled statements to become expired. An expired statement
  4587   4587   ** fails with an error code of SQLITE_SCHEMA if it is ever executed 
  4588   4588   ** (via sqlite3_step()).
  4589   4589   ** 
  4590   4590   ** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,
  4591   4591   ** then only the currently executing statement is affected. 
  4592   4592   */
  4593         -case OP_Expire: {        /* no stack growth */
         4593  +case OP_Expire: {        /* no-push */
  4594   4594     if( !pOp->p1 ){
  4595   4595       sqlite3ExpirePreparedStatements(db);
  4596   4596     }else{
  4597   4597       p->expired = 1;
  4598   4598     }
  4599   4599     break;
  4600   4600   }

Changes to src/vdbeInt.h.

   402    402   int sqlite3VdbeMemIntegerify(Mem*);
   403    403   double sqlite3VdbeRealValue(Mem*);
   404    404   int sqlite3VdbeMemRealify(Mem*);
   405    405   int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
   406    406   void sqlite3VdbeMemRelease(Mem *p);
   407    407   #ifndef NDEBUG
   408    408   void sqlite3VdbeMemSanity(Mem*, u8);
   409         -int sqlite3VdbeOpcodeUsesStack(u8);
          409  +int sqlite3VdbeOpcodeNoPush(u8);
   410    410   #endif
   411    411   int sqlite3VdbeMemTranslate(Mem*, u8);
   412    412   void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf, int nBuf);
   413    413   int sqlite3VdbeMemHandleBom(Mem *pMem);

Changes to src/vdbeaux.c.

   166    166     }
   167    167   }
   168    168   
   169    169   /*
   170    170   ** Return non-zero if opcode 'op' is guarenteed not to push more values
   171    171   ** onto the VDBE stack than it pops off.
   172    172   */
   173         -static int opcodeUsesStack(u8 op){
   174         -  /* The 10 STACK_MASK_n constants are defined in the automatically
          173  +static int opcodeNoPush(u8 op){
          174  +  /* The 10 NOPUSH_MASK_n constants are defined in the automatically
   175    175     ** generated header file opcodes.h. Each is a 16-bit bitmask, one
   176    176     ** bit corresponding to each opcode implemented by the virtual
   177         -  ** machine in vdbe.c. The bit is true if the word "stack" appears
          177  +  ** machine in vdbe.c. The bit is true if the word "no-push" appears
   178    178     ** in a comment on the same line as the "case OP_XXX:" in 
   179    179     ** sqlite3VdbeExec() in vdbe.c.
   180    180     **
   181    181     ** If the bit is true, then the corresponding opcode is guarenteed not
   182    182     ** to grow the stack when it is executed. Otherwise, it may grow the
   183    183     ** stack by at most one entry.
   184    184     **
   185         -  ** STACK_MASK_0 corresponds to opcodes 0 to 15. STACK_MASK_1 contains
          185  +  ** NOPUSH_MASK_0 corresponds to opcodes 0 to 15. NOPUSH_MASK_1 contains
   186    186     ** one bit for opcodes 16 to 31, and so on.
   187    187     **
   188    188     ** 16-bit bitmasks (rather than 32-bit) are specified in opcodes.h 
   189    189     ** because the file is generated by an awk program. Awk manipulates
   190    190     ** all numbers as floating-point and we don't want to risk a rounding
   191    191     ** error if someone builds with an awk that uses (for example) 32-bit 
   192    192     ** IEEE floats.
   193    193     */ 
   194    194     static u32 masks[5] = {
   195         -    STACK_MASK_0 + (STACK_MASK_1<<16),
   196         -    STACK_MASK_2 + (STACK_MASK_3<<16),
   197         -    STACK_MASK_4 + (STACK_MASK_5<<16),
   198         -    STACK_MASK_6 + (STACK_MASK_7<<16),
   199         -    STACK_MASK_8 + (STACK_MASK_9<<16)
          195  +    NOPUSH_MASK_0 + (NOPUSH_MASK_1<<16),
          196  +    NOPUSH_MASK_2 + (NOPUSH_MASK_3<<16),
          197  +    NOPUSH_MASK_4 + (NOPUSH_MASK_5<<16),
          198  +    NOPUSH_MASK_6 + (NOPUSH_MASK_7<<16),
          199  +    NOPUSH_MASK_8 + (NOPUSH_MASK_9<<16)
   200    200     };
   201    201     return (masks[op>>5] & (1<<(op&0x1F)));
   202    202   }
   203    203   
   204    204   #ifndef NDEBUG
   205         -int sqlite3VdbeOpcodeUsesStack(u8 op){
   206         -  return opcodeUsesStack(op);
          205  +int sqlite3VdbeOpcodeNoPush(u8 op){
          206  +  return opcodeNoPush(op);
   207    207   }
   208    208   #endif
   209    209   
   210    210   /*
   211    211   ** Loop through the program looking for P2 values that are negative.
   212    212   ** Each such value is a label.  Resolve the label by setting the P2
   213    213   ** value to its correct non-zero value.
................................................................................
   235    235        */
   236    236       if( opcode==OP_Function ){
   237    237         if( pOp->p1>nMaxArgs ) nMaxArgs = pOp->p1;
   238    238       }else if( opcode==OP_AggFunc ){
   239    239         if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
   240    240       }
   241    241   
   242         -    if( opcodeUsesStack(opcode) ){
          242  +    if( opcodeNoPush(opcode) ){
   243    243         nMaxStack--;
   244    244       }
   245    245   
   246    246       if( pOp->p2>=0 ) continue;
   247    247       assert( -1-pOp->p2<p->nLabel );
   248    248       pOp->p2 = aLabel[-1-pOp->p2];
   249    249     }