1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-08 14:02:16 +03:00

Combine the ExprList_item objects and the ExprList wrapper into a single

memory allocation, for improved performance and reduced footprint.

FossilOrigin-Name: 2b6560ad88b92820c383bcdc1e30c06f8b081ef7c6d9b1af71d2bb76c83e35cd
This commit is contained in:
drh
2017-04-05 11:32:13 +00:00
parent 32d0eba4c2
commit 43606175e2
5 changed files with 28 additions and 35 deletions

View File

@@ -2443,6 +2443,7 @@ struct Expr {
*/
struct ExprList {
int nExpr; /* Number of expressions on the list */
int nAlloc; /* Number of a[] slots allocated */
struct ExprList_item { /* For each expression in the list */
Expr *pExpr; /* The parse tree for this expression */
char *zName; /* Token associated with this expression */
@@ -2458,7 +2459,7 @@ struct ExprList {
} x;
int iConstExprReg; /* Register in which Expr value is cached */
} u;
} *a; /* Alloc a power of two greater or equal to nExpr */
} a[1]; /* One slot for each expression in the list */
};
/*