Remove redundant code from sqlite3GetTempReg(). (CVS 5342)

FossilOrigin-Name: 212d05d38c8126f99c028c5ab021b219487fa01e
This commit is contained in:
danielk1977 2008-07-04 09:41:39 +00:00
parent a7d8b85980
commit 2f425f6b64
3 changed files with 9 additions and 21 deletions

View File

@ -1,5 +1,5 @@
C Remove\sreferences\sto\stemporary\sregisters\sfrom\sthe\scompiler\scolumn-cache\swhen\ssuch\sregisters\sare\sreleased.\sFix\sfor\s#3201.\s(CVS\s5341)
D 2008-07-04T09:15:11
C Remove\sredundant\scode\sfrom\ssqlite3GetTempReg().\s(CVS\s5342)
D 2008-07-04T09:41:39
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 325dfac0a0dd1cb4d975f1ace6453157892e6042
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
@ -103,7 +103,7 @@ F src/callback.c 3ba98ae46f60aa7c2c40eac7d18fe5ba9b706b83
F src/complete.c cb14e06dbe79dee031031f0d9e686ff306afe07c
F src/date.c e841168e5520bbbb2a1cbcdce7531d8b23017b4d
F src/delete.c d3fc5987f2eb88f7b9549d58a5dfea079a83fe8b
F src/expr.c 88737070caff1c85f3336c53c3dc7ca360b00da6
F src/expr.c 8f2caa888af148ebf9cdb2cf7ffaae2a09767c48
F src/fault.c 3638519d1e0b82bccfafcb9f5ff491918b28f8e1
F src/func.c 1e7d9569570134ac0771a00382d9d4b41c4aa052
F src/global.c 2304cfa3288763bd2fed10caf8c6fbaa2b383f4e
@ -598,7 +598,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 1dbced29de5f59ba2ebf877edcadf171540374d1
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P a48e3d95f7a656285e959cef595cbe6d53428ad9
R 15ada11bb606ce47c95f2a4cfe32122e
P f099d6773a837dbe4ba85a8fda818e2d9466e743
R 50f400c9772d85c2c24551ddc1a0402e
U danielk1977
Z 51ba53ad7e27ba8ada3bf3fd25b9e527
Z 7224db38772dcdb44aa2d3e38e2dec82

View File

@ -1 +1 @@
f099d6773a837dbe4ba85a8fda818e2d9466e743
212d05d38c8126f99c028c5ab021b219487fa01e

View File

@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.382 2008/07/04 09:15:11 danielk1977 Exp $
** $Id: expr.c,v 1.383 2008/07/04 09:41:39 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@ -3549,22 +3549,10 @@ void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
** Allocate or deallocate temporary use registers during code generation.
*/
int sqlite3GetTempReg(Parse *pParse){
int i, r;
if( pParse->nTempReg==0 ){
return ++pParse->nMem;
}
for(i=0; i<pParse->nTempReg; i++){
r = pParse->aTempReg[i];
if( usedAsColumnCache(pParse, r, r) ) continue;
}
if( i>=pParse->nTempReg ){
return ++pParse->nMem;
}
while( i<pParse->nTempReg-1 ){
pParse->aTempReg[i] = pParse->aTempReg[i+1];
}
pParse->nTempReg--;
return r;
return pParse->aTempReg[--pParse->nTempReg];
}
void sqlite3ReleaseTempReg(Parse *pParse, int iReg){
if( iReg && pParse->nTempReg<ArraySize(pParse->aTempReg) ){