1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Add the OP_IntCopy opcode - an optimized version of OP_SCopy that only works

for integer values.

FossilOrigin-Name: 3a2f73a4924860fde8ee41ad646e7a02d29ad9d5
This commit is contained in:
drh
2015-10-15 18:04:59 +00:00
parent 9eef8c6934
commit fed7ac6f04
4 changed files with 25 additions and 9 deletions

View File

@@ -1273,6 +1273,22 @@ case OP_SCopy: { /* out2 */
break;
}
/* Opcode: IntCopy P1 P2 * * *
** Synopsis: r[P2]=r[P1]
**
** Transfer the integer value held in register P1 into register P2.
**
** This is an optimized version of SCopy that works only for integer
** values.
*/
case OP_IntCopy: { /* out2 */
pIn1 = &aMem[pOp->p1];
assert( (pIn1->flags & MEM_Int)!=0 );
pOut = &aMem[pOp->p2];
sqlite3VdbeMemSetInt64(pOut, pIn1->u.i);
break;
}
/* Opcode: ResultRow P1 P2 * * *
** Synopsis: output=r[P1@P2]
**