1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-15 11:41:13 +03:00

Register-ify the OP_AddImm and all casting opcodes. Omit the

OP_MemIncr opcode. (CVS 4683)

FossilOrigin-Name: 3e8a07dd3cc9921ad39e379576abb0b485a42202
This commit is contained in:
drh
2008-01-05 05:20:10 +00:00
parent b1fdb2adea
commit 8558cde1ab
12 changed files with 100 additions and 120 deletions

View File

@@ -11,7 +11,7 @@
*************************************************************************
** This file contains code used to implement the PRAGMA command.
**
** $Id: pragma.c,v 1.159 2008/01/05 04:06:04 drh Exp $
** $Id: pragma.c,v 1.160 2008/01/05 05:20:10 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -495,7 +495,7 @@ void sqlite3Pragma(
sqlite3VdbeAddOp2(v, OP_Integer, iLimit, 1);
addr = sqlite3VdbeAddOp2(v, OP_IncrVacuum, iDb, 0);
sqlite3VdbeAddOp2(v, OP_Callback, 0, 0);
sqlite3VdbeAddOp2(v, OP_MemIncr, -1, 1);
sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1);
sqlite3VdbeAddOp2(v, OP_IfMemPos, 1, addr);
sqlite3VdbeJumpHere(v, addr);
}else
@@ -905,11 +905,11 @@ void sqlite3Pragma(
sqlite3OpenTableAndIndices(pParse, pTab, 1, OP_OpenRead);
sqlite3VdbeAddOp2(v, OP_Integer, 0, 2);
loopTop = sqlite3VdbeAddOp2(v, OP_Rewind, 1, 0);
sqlite3VdbeAddOp2(v, OP_MemIncr, 1, 2);
sqlite3VdbeAddOp2(v, OP_AddImm, 2, 1);
for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
int jmp2;
static const VdbeOpList idxErr[] = {
{ OP_MemIncr, -1, 1, 0},
{ OP_AddImm, 1, -1, 0},
{ OP_String8, 0, 0, 0}, /* 1 */
{ OP_Rowid, 1, 0, 0},
{ OP_String8, 0, 0, 0}, /* 3 */
@@ -931,12 +931,12 @@ void sqlite3Pragma(
static const VdbeOpList cntIdx[] = {
{ OP_Integer, 0, 3, 0},
{ OP_Rewind, 0, 0, 0}, /* 1 */
{ OP_MemIncr, 1, 3, 0},
{ OP_AddImm, 3, 1, 0},
{ OP_Next, 0, 0, 0}, /* 3 */
{ OP_SCopy, 2, 0, 0},
{ OP_SCopy, 3, 0, 0},
{ OP_Eq, 0, 0, 0}, /* 6 */
{ OP_MemIncr, -1, 1, 0},
{ OP_AddImm, 1, -1, 0},
{ OP_String8, 0, 0, 0}, /* 8 */
{ OP_String8, 0, 0, 0}, /* 9 */
{ OP_Concat, 0, 0, 0},