Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Simplifications to the expression code generator. Remove about 80 lines of older and obsolete code. |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
53f5cfe11516d0496c7760378b6305c3 |
User & Date: | drh 2010-09-27 18:14:12.000 |
References
2011-10-25
| ||
20:36 | Cherrypick changes [53f5cfe115] and [1f7ef0af8d] in order to fix an issue with DISTINCT (check-in: 14bc58ca70 user: drh tags: branch-3.7.2) | |
Context
2010-09-28
| ||
07:14 | Merge fixes for ticket [b351d95f9cd5ef17e9d9dbae18f5ca8611190001] into the trunk. (check-in: 1f7ef0af8d user: drh tags: trunk) | |
2010-09-27
| ||
21:09 | Add assert() statements that fail when a shallow copy is accessed after the original has been modified. These assert() statements should detect the kinds of subtle SCopy bugs such as caused the fault in ticket [b351d95f9cd5ef17e9d9dbae18f]. (check-in: 8b8e1732e8 user: drh tags: bug-b351d95f9c) | |
18:14 | Simplifications to the expression code generator. Remove about 80 lines of older and obsolete code. (check-in: 53f5cfe115 user: drh tags: trunk) | |
2010-09-25
| ||
22:32 | Enhance the ANALYZE command so that it gathers statistics in the sqlite_stat1 table even for tables that are empty or have no indices. (check-in: a7645d2938 user: drh tags: trunk) | |
Changes
Changes to src/expr.c.
︙ | ︙ | |||
2230 2231 2232 2233 2234 2235 2236 | int r = p->iReg; if( r>=iFrom && r<=iTo ) return 1; /*NO_TEST*/ } return 0; } #endif /* SQLITE_DEBUG || SQLITE_COVERAGE_TEST */ | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 | int r = p->iReg; if( r>=iFrom && r<=iTo ) return 1; /*NO_TEST*/ } return 0; } #endif /* SQLITE_DEBUG || SQLITE_COVERAGE_TEST */ /* ** Generate code into the current Vdbe to evaluate the given ** expression. Attempt to store the results in register "target". ** Return the register where results are stored. ** ** With this routine, there is no guarantee that results will ** be stored in target. The result might be stored in some other |
︙ | ︙ | |||
2405 2406 2407 2408 2409 2410 2411 | break; } case TK_REGISTER: { inReg = pExpr->iTable; break; } case TK_AS: { | | | 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 | break; } case TK_REGISTER: { inReg = pExpr->iTable; break; } case TK_AS: { inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); break; } #ifndef SQLITE_OMIT_CAST case TK_CAST: { /* Expressions of the form: CAST(pLeft AS token) */ int aff, to_op; inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target); |
︙ | ︙ | |||
3108 3109 3110 3111 3112 3113 3114 | ){ struct ExprList_item *pItem; int i, n; assert( pList!=0 ); assert( target>0 ); n = pList->nExpr; for(pItem=pList->a, i=0; i<n; i++, pItem++){ | | | | | | < < | < < < | 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 | ){ struct ExprList_item *pItem; int i, n; assert( pList!=0 ); assert( target>0 ); n = pList->nExpr; for(pItem=pList->a, i=0; i<n; i++, pItem++){ Expr *pExpr = pItem->pExpr; int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i); assert( pParse->pVdbe || pParse->db->mallocFailed ); if( inReg!=target+i && pParse->pVdbe ){ sqlite3VdbeAddOp2(pParse->pVdbe, doHardCopy ? OP_Copy : OP_SCopy, inReg, target+i); } } return n; } /* ** Generate code for a BETWEEN operator. |
︙ | ︙ |
Changes to src/sqliteInt.h.
︙ | ︙ | |||
2698 2699 2700 2701 2702 2703 2704 | void sqlite3ExprCodeCopy(Parse*, int, int, int); void sqlite3ExprCacheStore(Parse*, int, int, int); void sqlite3ExprCachePush(Parse*); void sqlite3ExprCachePop(Parse*, int); void sqlite3ExprCacheRemove(Parse*, int, int); void sqlite3ExprCacheClear(Parse*); void sqlite3ExprCacheAffinityChange(Parse*, int, int); | < | 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 | void sqlite3ExprCodeCopy(Parse*, int, int, int); void sqlite3ExprCacheStore(Parse*, int, int, int); void sqlite3ExprCachePush(Parse*); void sqlite3ExprCachePop(Parse*, int); void sqlite3ExprCacheRemove(Parse*, int, int); void sqlite3ExprCacheClear(Parse*); void sqlite3ExprCacheAffinityChange(Parse*, int, int); int sqlite3ExprCode(Parse*, Expr*, int); int sqlite3ExprCodeTemp(Parse*, Expr*, int*); int sqlite3ExprCodeTarget(Parse*, Expr*, int); int sqlite3ExprCodeAndCache(Parse*, Expr*, int); void sqlite3ExprCodeConstants(Parse*, Expr*); int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int); void sqlite3ExprIfTrue(Parse*, Expr*, int, int); |
︙ | ︙ |