mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-06 15:49:35 +03:00
Get rid of OP_Dup, OP_MemStore, OP_MemLoad, and OP_MemMove. Replace
with OP_Copy, OP_SCopy, and OP_Move. Add the infrastructure for operation properties in1, in2, in3, out2, and out3 but do not yet use any of these. (CVS 4682) FossilOrigin-Name: cc149eb9ca3c672cc6fea3528353234ac2ed5745
This commit is contained in:
12
src/delete.c
12
src/delete.c
@@ -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.148 2008/01/04 22:01:03 drh Exp $
|
||||
** $Id: delete.c,v 1.149 2008/01/05 04:06:04 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
|
||||
@@ -68,8 +68,8 @@ void sqlite3CodeInsert(Parse *p, int iCur, u8 flags){
|
||||
int iData = ++p->nMem;
|
||||
int iKey = ++p->nMem;
|
||||
Vdbe *v = sqlite3GetVdbe(p);
|
||||
sqlite3VdbeAddOp2(v, OP_MemStore, iData, 1);
|
||||
sqlite3VdbeAddOp2(v, OP_MemStore, iKey, 1);
|
||||
sqlite3VdbeAddOp2(v, OP_Move, 0, iData);
|
||||
sqlite3VdbeAddOp2(v, OP_Move, 0, iKey);
|
||||
sqlite3VdbeAddOp3(v, OP_Insert, iCur, iData, iKey);
|
||||
sqlite3VdbeChangeP5(v, sqlite3VdbeCurrentAddr(v)-1, flags);
|
||||
}
|
||||
@@ -87,7 +87,7 @@ int sqlite3StackToReg(Parse *p, int nVal){
|
||||
assert(v);
|
||||
p->nMem += nVal;
|
||||
for(i=nVal-1; i>=0; i--){
|
||||
sqlite3VdbeAddOp2(v, OP_MemStore, iRet+i, 1);
|
||||
sqlite3VdbeAddOp2(v, OP_Move, 0, iRet+i);
|
||||
}
|
||||
return iRet;
|
||||
}
|
||||
@@ -96,7 +96,7 @@ void sqlite3RegToStack(Parse *p, int iReg, int nVal){
|
||||
Vdbe *v = sqlite3GetVdbe(p);
|
||||
assert(v);
|
||||
for(i=0; i<nVal; i++){
|
||||
sqlite3VdbeAddOp2(v, OP_MemLoad, iReg+i, 0);
|
||||
sqlite3VdbeAddOp2(v, OP_SCopy, iReg+i, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ void sqlite3GenerateIndexKey(
|
||||
for(j=0; j<pIdx->nColumn; j++){
|
||||
int idx = pIdx->aiColumn[j];
|
||||
if( idx==pTab->iPKey ){
|
||||
sqlite3VdbeAddOp1(v, OP_Dup, j);
|
||||
sqlite3VdbeAddOp1(v, OP_Copy, -j);
|
||||
}else{
|
||||
sqlite3VdbeAddOp2(v, OP_Column, iCur, idx);
|
||||
sqlite3ColumnDefault(v, pTab, idx);
|
||||
|
||||
Reference in New Issue
Block a user