1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Optimizations to the code generator. (CVS 1899)

FossilOrigin-Name: bd6649c5aae1bf182610eb267b546c297a34481d
This commit is contained in:
drh
2004-08-21 17:54:45 +00:00
parent 92febd92ad
commit 290c19482e
19 changed files with 256 additions and 355 deletions

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.156 2004/08/20 16:02:39 drh Exp $
** $Id: expr.c,v 1.157 2004/08/21 17:54:45 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1079,6 +1079,27 @@ int sqlite3ExprCheck(Parse *pParse, Expr *pExpr, int allowAgg, int *pIsAgg){
return nErr;
}
/*
** Call sqlite3ExprResolveIds() followed by sqlite3ExprCheck().
**
** This routine is provided as a convenience since it is very common
** to call ResolveIds() and Check() back to back.
*/
int sqlite3ExprResolveAndCheck(
Parse *pParse, /* The parser context */
SrcList *pSrcList, /* List of tables used to resolve column names */
ExprList *pEList, /* List of expressions used to resolve "AS" */
Expr *pExpr, /* The expression to be analyzed. */
int allowAgg, /* True to allow aggregate expressions */
int *pIsAgg /* Set to TRUE if aggregates are found */
){
if( pExpr==0 ) return 0;
if( sqlite3ExprResolveIds(pParse,pSrcList,pEList,pExpr) ){
return 1;
}
return sqlite3ExprCheck(pParse, pExpr, allowAgg, pIsAgg);
}
/*
** Generate an instruction that will put the integer describe by
** text z[0..n-1] on the stack.