1
0
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:
drh
2018-01-25 01:20:29 +00:00
parent 9f8952390a
commit cad42838d7
3 changed files with 12 additions and 12 deletions

View File

@@ -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);