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

Begin setting a foundation on which to convert the VM from a stack-based

to a register-based machine.  Everything is still mostly stack based with
this check-in.  This change merely begins adding infrastructure to support
a register-based architecture. (CVS 4652)

FossilOrigin-Name: 051ec01f2799e095516015f2ef0180e50fac387c
This commit is contained in:
drh
2008-01-02 00:34:36 +00:00
parent 8f2c54e6e2
commit d4e70ebd6f
17 changed files with 403 additions and 225 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.135 2008/01/01 19:02:09 danielk1977 Exp $
** $Id: delete.c,v 1.136 2008/01/02 00:34:37 drh Exp $
*/
#include "sqliteInt.h"
@@ -76,7 +76,7 @@ void sqlite3OpenTable(
assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );
sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite), pTab->zName);
sqlite3VdbeAddOp(v, OP_Integer, iDb, 0);
VdbeComment((v, "# %s", pTab->zName));
VdbeComment((v, "%s", pTab->zName));
sqlite3VdbeAddOp(v, opcode, iCur, pTab->tnum);
sqlite3VdbeAddOp(v, OP_SetNumColumns, iCur, pTab->nCol);
}
@@ -391,8 +391,7 @@ void sqlite3DeleteFrom(
** invoke the callback function.
*/
if( db->flags & SQLITE_CountRows && pParse->nested==0 && !pParse->trigStack ){
sqlite3VdbeAddOp(v, OP_MemLoad, memCnt, 0);
sqlite3VdbeAddOp(v, OP_Callback, 1, 0);
sqlite3VdbeAddOp(v, OP_ResultRow, memCnt, 1);
sqlite3VdbeSetNumCols(v, 1);
sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows deleted", P3_STATIC);
}