mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-07 02:42:48 +03:00
Slightly smaller and faster implementation of OP_If and OP_IfNot.
FossilOrigin-Name: 6ab42934e2c4957b5d8927bf4434a9db07ab6078987a6a2d25f35cc468d21203
This commit is contained in:
10
src/vdbe.c
10
src/vdbe.c
@@ -2289,11 +2289,11 @@ case OP_IfNot: { /* jump, in1 */
|
||||
if( pIn1->flags & MEM_Null ){
|
||||
c = pOp->p3;
|
||||
}else{
|
||||
#ifdef SQLITE_OMIT_FLOATING_POINT
|
||||
c = sqlite3VdbeIntValue(pIn1)!=0;
|
||||
#else
|
||||
c = sqlite3VdbeRealValue(pIn1)!=0.0;
|
||||
#endif
|
||||
if( pIn1->flags & MEM_Int ){
|
||||
c = pIn1->u.i!=0;
|
||||
}else{
|
||||
c = sqlite3VdbeRealValue(pIn1)!=0.0;
|
||||
}
|
||||
if( pOp->opcode==OP_IfNot ) c = !c;
|
||||
}
|
||||
VdbeBranchTaken(c!=0, 2);
|
||||
|
Reference in New Issue
Block a user