/ Check-in [9d0d8c2e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Change the OP_DecrJumpZero opcode back to its old behavior of always decrementing, except top the decrementing when it reaches the largest negative number.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9d0d8c2e7c529562889de02346733dcb532e9388
User & Date: drh 2016-11-30 05:08:59
Context
2016-11-30
14:47
Fix then handling of the (oversized) integer literal -0x8000000000000000. check-in: 3816bb41 user: drh tags: trunk
05:08
Change the OP_DecrJumpZero opcode back to its old behavior of always decrementing, except top the decrementing when it reaches the largest negative number. check-in: 9d0d8c2e user: drh tags: trunk
04:07
More improvements to boundary cases in the date/time functions, flowing out of branch coverage testing. check-in: 1218005a user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/vdbe.c.

6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
  }
  break;
}

/* Opcode: DecrJumpZero P1 P2 * * *
** Synopsis: if (--r[P1])==0 goto P2
**
** Register P1 must hold an integer.  If the value in P1 is positive,
** decrement the value and jump to P2 if the new value is exactly zero.
*/
case OP_DecrJumpZero: {      /* jump, in1 */
  pIn1 = &aMem[pOp->p1];
  assert( pIn1->flags&MEM_Int );
  if( pIn1->u.i>0 ){
    pIn1->u.i--;
    VdbeBranchTaken(pIn1->u.i==0, 2);
    if( pIn1->u.i==0 ) goto jump_to_p2;
  }
  break;
}


/* Opcode: AggStep0 * P2 P3 P4 P5
** Synopsis: accum=r[P3] step(r[P2@P5])
**







|
|




|
<
|
|
<







6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031

6032
6033

6034
6035
6036
6037
6038
6039
6040
  }
  break;
}

/* Opcode: DecrJumpZero P1 P2 * * *
** Synopsis: if (--r[P1])==0 goto P2
**
** Register P1 must hold an integer.  Decrement the value in P1
** and jump to P2 if the new value is exactly zero.
*/
case OP_DecrJumpZero: {      /* jump, in1 */
  pIn1 = &aMem[pOp->p1];
  assert( pIn1->flags&MEM_Int );
  if( pIn1->u.i>SMALLEST_INT64 ) pIn1->u.i--;

  VdbeBranchTaken(pIn1->u.i==0, 2);
  if( pIn1->u.i==0 ) goto jump_to_p2;

  break;
}


/* Opcode: AggStep0 * P2 P3 P4 P5
** Synopsis: accum=r[P3] step(r[P2@P5])
**