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

Modify the build process so that the VDBE opcode numbers and the table

that contains the opcode names are both automatically generated. This makes
it much easier to create new VDBE opcodes. (CVS 746)

FossilOrigin-Name: eb54d455b0325d3be96daf6c220c4ee3e0da1a85
This commit is contained in:
drh
2002-09-08 00:04:50 +00:00
parent 8c90ebb0e2
commit 8f619ccd3c
9 changed files with 157 additions and 298 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.80 2002/08/24 18:24:54 drh Exp $
** $Id: expr.c,v 1.81 2002/09/08 00:04:52 drh Exp $
*/
#include "sqliteInt.h"
#include <ctype.h>
@@ -1369,7 +1369,13 @@ void sqliteExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
case TK_NE:
case TK_EQ: {
if( pParse->db->file_format>=4 && sqliteExprType(pExpr)==SQLITE_SO_TEXT ){
op += 6; /* Convert numeric opcodes to text opcodes */
/* Convert numeric comparison opcodes into text comparison opcodes.
** This step depends on the fact that the text comparision opcodes are
** always 6 greater than their corresponding numeric comparison
** opcodes.
*/
assert( OP_Eq+6 == OP_StrEq );
op += 6;
}
sqliteExprCode(pParse, pExpr->pLeft);
sqliteExprCode(pParse, pExpr->pRight);