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

Continuing work toward converting the VM into a register machine. (CVS 4707)

FossilOrigin-Name: a6dddebcc5ccbbf3009c9d06163a8b59036331de
This commit is contained in:
drh
2008-01-12 12:48:07 +00:00
parent d8c303fe0a
commit b765411161
13 changed files with 299 additions and 216 deletions

View File

@@ -12,7 +12,7 @@
** This file contains C code routines that are called by the parser
** in order to generate code for DELETE FROM statements.
**
** $Id: delete.c,v 1.156 2008/01/10 23:50:11 drh Exp $
** $Id: delete.c,v 1.157 2008/01/12 12:48:08 drh Exp $
*/
#include "sqliteInt.h"
@@ -60,20 +60,6 @@ int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
return 0;
}
/*
** This function is a temporary measure required because OP_Insert now
** reads the key and data to insert from memory cells.
*/
void sqlite3CodeInsert(Parse *p, int iCur, u8 flags){
int iData = ++p->nMem;
int iKey = ++p->nMem;
Vdbe *v = sqlite3GetVdbe(p);
sqlite3VdbeAddOp2(v, OP_Move, 0, iData);
sqlite3VdbeAddOp2(v, OP_Move, 0, iKey);
sqlite3VdbeAddOp3(v, OP_Insert, iCur, iData, iKey);
sqlite3VdbeChangeP5(v, flags);
}
/*
** Allocate nVal contiguous memory cells and return the index of the
** first. Also pop nVal elements from the stack and store them in the
@@ -91,14 +77,6 @@ int sqlite3StackToReg(Parse *p, int nVal){
}
return iRet;
}
void sqlite3RegToStack(Parse *p, int iReg, int nVal){
int i;
Vdbe *v = sqlite3GetVdbe(p);
assert(v);
for(i=0; i<nVal; i++){
sqlite3VdbeAddOp2(v, OP_SCopy, iReg+i, 0);
}
}
/*
** Generate code that will open a table for reading.