mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-11 01:42:22 +03:00
Remove out-of-date comment regarding use of Parse.pConstExpr.
FossilOrigin-Name: 71548f72ad578db3d6ee409956386ace23ab2258d37cdc29ef2fb126e48f1ee3
This commit is contained in:
11
src/build.c
11
src/build.c
@@ -246,19 +246,14 @@ void sqlite3FinishCoding(Parse *pParse){
|
||||
*/
|
||||
if( pParse->pAinc ) sqlite3AutoincrementBegin(pParse);
|
||||
|
||||
/* Code constant expressions that where factored out of inner loops.
|
||||
**
|
||||
** The pConstExpr list might also contain expressions that we simply
|
||||
** want to keep around until the Parse object is deleted. Such
|
||||
** expressions have iConstExprReg==0. Do not generate code for
|
||||
** those expressions, of course.
|
||||
/* Code constant expressions that were factored out of inner loops.
|
||||
*/
|
||||
if( pParse->pConstExpr ){
|
||||
ExprList *pEL = pParse->pConstExpr;
|
||||
pParse->okConstFactor = 0;
|
||||
for(i=0; i<pEL->nExpr; i++){
|
||||
int iReg = pEL->a[i].u.iConstExprReg;
|
||||
sqlite3ExprCode(pParse, pEL->a[i].pExpr, iReg);
|
||||
assert( pEL->a[i].u.iConstExprReg>0 );
|
||||
sqlite3ExprCode(pParse, pEL->a[i].pExpr, pEL->a[i].u.iConstExprReg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5048,7 +5048,7 @@ expr_code_doover:
|
||||
** once. If no functions are involved, then factor the code out and put it at
|
||||
** the end of the prepared statement in the initialization section.
|
||||
**
|
||||
** If regDest>=0 then the result is always stored in that register and the
|
||||
** If regDest>0 then the result is always stored in that register and the
|
||||
** result is not reusable. If regDest<0 then this routine is free to
|
||||
** store the value wherever it wants. The register where the expression
|
||||
** is stored is returned. When regDest<0, two identical expressions might
|
||||
@@ -5063,6 +5063,7 @@ int sqlite3ExprCodeRunJustOnce(
|
||||
){
|
||||
ExprList *p;
|
||||
assert( ConstFactorOk(pParse) );
|
||||
assert( regDest!=0 );
|
||||
p = pParse->pConstExpr;
|
||||
if( regDest<0 && p ){
|
||||
struct ExprList_item *pItem;
|
||||
|
||||
Reference in New Issue
Block a user