mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Remove an unnecessary stack variable from sqlite3VdbeExec().
FossilOrigin-Name: c54bd9c82dd34951dc87848c0b19fcccaef928db
This commit is contained in:
12
manifest
12
manifest
@@ -1,5 +1,5 @@
|
||||
C Improvements\sto\scommits.\s\sNo\scode\schanges.
|
||||
D 2016-08-13T13:03:46.411
|
||||
C Remove\san\sunnecessary\sstack\svariable\sfrom\ssqlite3VdbeExec().
|
||||
D 2016-08-13T14:17:02.223
|
||||
F Makefile.in cfd8fb987cd7a6af046daa87daa146d5aad0e088
|
||||
F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
|
||||
F Makefile.msc d66d0395c38571aab3804f8db0fa20707ae4609a
|
||||
@@ -450,7 +450,7 @@ F src/update.c 4f05ea8cddfa367d045e03589756c02199e8f9bd
|
||||
F src/utf.c 699001c79f28e48e9bcdf8a463da029ea660540c
|
||||
F src/util.c 810ec3f22e2d1b62e66c30fe3621ebdedd23584d
|
||||
F src/vacuum.c 9dd2f5d276bc6094d8f1d85ecd41b30c1a002a43
|
||||
F src/vdbe.c 3961408d1e4507b468b6297b79307bd3eee51988
|
||||
F src/vdbe.c 1b66646c30ae83db67edce52f62801e6204a6e47
|
||||
F src/vdbe.h 67bc551f7faf04c33493892e4b378aada823ed10
|
||||
F src/vdbeInt.h c59381049af5c7751a83456c39b80d1a6fde1f9d
|
||||
F src/vdbeapi.c c3f6715a99995c11748ecad91d25e93fd9fc390b
|
||||
@@ -1516,7 +1516,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
|
||||
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
|
||||
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
|
||||
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
|
||||
P ec70a67ebc997f457be4d52d8affc37e142dc3ff
|
||||
R 247af002c746a42b304e23bb96c4f14d
|
||||
P 18f5a3bee4f870be4644a6042a20081c46edb7d0
|
||||
R 4db42b6f0c7885d63148768f55fefe94
|
||||
U drh
|
||||
Z 092630ac00e90be639ed64dcd2fc60ce
|
||||
Z 3f3cd455e86203369782a9bcddee8cc7
|
||||
|
@@ -1 +1 @@
|
||||
18f5a3bee4f870be4644a6042a20081c46edb7d0
|
||||
c54bd9c82dd34951dc87848c0b19fcccaef928db
|
27
src/vdbe.c
27
src/vdbe.c
@@ -573,7 +573,7 @@ int sqlite3VdbeExec(
|
||||
sqlite3 *db = p->db; /* The database */
|
||||
u8 resetSchemaOnFault = 0; /* Reset schema after an error if positive */
|
||||
u8 encoding = ENC(db); /* The database encoding */
|
||||
int iCompare = 0; /* Result of last OP_Compare operation */
|
||||
int iCompare = 0; /* Result of last comparison */
|
||||
unsigned nVmStep = 0; /* Number of virtual machine steps */
|
||||
#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
|
||||
unsigned nProgressLimit = 0;/* Invoke xProgress() when nVmStep reaches this */
|
||||
@@ -585,7 +585,6 @@ int sqlite3VdbeExec(
|
||||
Mem *pOut = 0; /* Output operand */
|
||||
int *aPermute = 0; /* Permutation of columns for OP_Compare */
|
||||
i64 lastRowid = db->lastRowid; /* Saved value of the last insert ROWID */
|
||||
int cmpRes; /* Result of last comparison operation */
|
||||
#ifdef VDBE_PROFILE
|
||||
u64 start; /* CPU clock count at start of opcode */
|
||||
#endif
|
||||
@@ -2004,16 +2003,16 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
||||
&& (flags3&MEM_Null)!=0
|
||||
&& (flags3&MEM_Cleared)==0
|
||||
){
|
||||
cmpRes = 0; /* Operands are equal */
|
||||
iCompare = 0; /* Operands are equal */
|
||||
}else{
|
||||
cmpRes = 1; /* Operands are not equal */
|
||||
iCompare = 1; /* Operands are not equal */
|
||||
}
|
||||
}else{
|
||||
/* SQLITE_NULLEQ is clear and at least one operand is NULL,
|
||||
** then the result is always NULL.
|
||||
** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
|
||||
*/
|
||||
cmpRes = 1; /* Operands are not equal */
|
||||
iCompare = 1; /* Operands are not equal */
|
||||
if( pOp->p5 & SQLITE_STOREP2 ){
|
||||
pOut = &aMem[pOp->p2];
|
||||
memAboutToChange(p, pOut);
|
||||
@@ -2066,15 +2065,15 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
||||
sqlite3VdbeMemExpandBlob(pIn3);
|
||||
flags3 &= ~MEM_Zero;
|
||||
}
|
||||
cmpRes = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);
|
||||
iCompare = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);
|
||||
}
|
||||
switch( pOp->opcode ){
|
||||
case OP_Eq: res = cmpRes==0; break;
|
||||
case OP_Ne: res = cmpRes!=0; break;
|
||||
case OP_Lt: res = cmpRes<0; break;
|
||||
case OP_Le: res = cmpRes<=0; break;
|
||||
case OP_Gt: res = cmpRes>0; break;
|
||||
case OP_Ge: res = cmpRes>=0; break;
|
||||
case OP_Eq: res = iCompare==0; break;
|
||||
case OP_Ne: res = iCompare!=0; break;
|
||||
case OP_Lt: res = iCompare<0; break;
|
||||
case OP_Le: res = iCompare<=0; break;
|
||||
case OP_Gt: res = iCompare>0; break;
|
||||
default: res = iCompare>=0; break;
|
||||
}
|
||||
|
||||
/* Undo any changes made by applyAffinity() to the input registers. */
|
||||
@@ -2116,8 +2115,8 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */
|
||||
case OP_ElseNotEq: { /* same as TK_ESCAPE, jump */
|
||||
assert( pOp>aOp );
|
||||
assert( pOp[-1].opcode==OP_Lt || pOp[-1].opcode==OP_Gt );
|
||||
VdbeBranchTaken(cmpRes!=0, 2);
|
||||
if( cmpRes!=0 ) goto jump_to_p2;
|
||||
VdbeBranchTaken(iCompare!=0, 2);
|
||||
if( iCompare!=0 ) goto jump_to_p2;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user