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

Convert the "~" and "NOT" operators to be two-address instructions.

Ticket #3541. (CVS 6028)

FossilOrigin-Name: ea9b747efb22fd3f679c3ef86ed51986c5ad9436
This commit is contained in:
drh
2008-12-15 15:27:51 +00:00
parent 01ecbeeb57
commit e99fa2af71
5 changed files with 71 additions and 32 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.407 2008/12/10 21:19:57 drh Exp $
** $Id: expr.c,v 1.408 2008/12/15 15:27:52 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1975,11 +1975,10 @@ int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
assert( TK_NOT==OP_Not );
testcase( op==TK_BITNOT );
testcase( op==TK_NOT );
inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
testcase( inReg==target );
testcase( usedAsColumnCache(pParse, inReg, inReg) );
inReg = sqlite3ExprWritableRegister(pParse, inReg, target);
sqlite3VdbeAddOp1(v, op, inReg);
r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
testcase( regFree1==0 );
inReg = target;
sqlite3VdbeAddOp2(v, op, r1, inReg);
break;
}
case TK_ISNULL: