-C Variable\sname\schange:\sazVar\sto\sapVar.\s(CVS\s1404)
-D 2004-05-19T11:24:26
+C Really\sremove\sthe\sOP_StrEq\sopcode\sthis\stime\s-\sappearently\sI\sdidn't\ssave\sthe\nfile\sout\sof\sthe\seditor\sbefore\sdoing\sthe\scheck-in\s(1397).\s(CVS\s1405)
+D 2004-05-19T11:31:13
F Makefile.in ab7b0d5118e2da97bac66be8684a1034e3500f5a
F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
F src/utf.c 48c537bf7990ce32a36b051401874d024ec2a07b
F src/util.c b72f775a6c3fa404d70250382f63d708e17bc332
F src/vacuum.c c134702e023db8778e6be59ac0ea7b02315b5476
-F src/vdbe.c 962092231fad5370a57ad5b7398944ca6a27678f
+F src/vdbe.c 415b3b195e71c7771f9ea9303ee45427e0295c2c
F src/vdbe.h 314e9c07db73a42a6ba91ab7539e27652fc88870
F src/vdbeInt.h 3f76e27be527f4848dc2aae898f2d8709eb1b32c
F src/vdbeaux.c 5743e15988d1cbe2db055c1cb6faaa062c1ec601
F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
F www/whentouse.tcl a8335bce47cc2fddb07f19052cb0cb4d9129a8e4
-P f71844bc27c9fc799af3337daf2a212370d4a724
-R 09bed5008417bd932f4640e166507cff
+P 45169ce015da07da9a874b5b075ea6a05f59f162
+R 1e0fe3ea2cd4710538f26552e9f58e44
U drh
-Z d3e5bec58d881a9caa41401041151755
+Z b0b27c4a71b1d00c6f553d0425414f30
** in this file for details. If in doubt, do not deviate from existing
** commenting and indentation practices when changing or adding code.
**
-** $Id: vdbe.c,v 1.301 2004/05/19 11:24:26 drh Exp $
+** $Id: vdbe.c,v 1.302 2004/05/19 11:31:13 drh Exp $
*/
#include "sqliteInt.h"
#include "os.h"
}
break;
}
-/* INSERT NO CODE HERE!
-**
-** The opcode numbers are extracted from this source file by doing
-**
-** grep '^case OP_' vdbe.c | ... >opcodes.h
-**
-** The opcodes are numbered in the order that they appear in this file.
-** But in order for the expression generating code to work right, the
-** string comparison operators that follow must be numbered exactly 6
-** greater than the numeric comparison opcodes above. So no other
-** cases can appear between the two.
-*/
-/* Opcode: StrEq P1 P2 *
-**
-** Pop the top two elements from the stack. If they are equal, then
-** jump to instruction P2. Otherwise, continue to the next instruction.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Eq.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-/* Opcode: StrNe P1 P2 *
-**
-** Pop the top two elements from the stack. If they are not equal, then
-** jump to instruction P2. Otherwise, continue to the next instruction.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Ne.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-/* Opcode: StrLt P1 P2 *
-**
-** Pop the top two elements from the stack. If second element (the
-** next on stack) is less than the first (the top of stack), then
-** jump to instruction P2. Otherwise, continue to the next instruction.
-** In other words, jump if NOS<TOS.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Lt.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-/* Opcode: StrLe P1 P2 *
-**
-** Pop the top two elements from the stack. If second element (the
-** next on stack) is less than or equal to the first (the top of stack),
-** then jump to instruction P2. In other words, jump if NOS<=TOS.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Le.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-/* Opcode: StrGt P1 P2 *
-**
-** Pop the top two elements from the stack. If second element (the
-** next on stack) is greater than the first (the top of stack),
-** then jump to instruction P2. In other words, jump if NOS>TOS.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Gt.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-/* Opcode: StrGe P1 P2 *
-**
-** Pop the top two elements from the stack. If second element (the next
-** on stack) is greater than or equal to the first (the top of stack),
-** then jump to instruction P2. In other words, jump if NOS>=TOS.
-**
-** If either operand is NULL (and thus if the result is unknown) then
-** take the jump if P1 is true.
-**
-** The strcmp() library routine is used for the comparison. For a
-** numeric comparison, use OP_Ge.
-**
-** If P2 is zero, do not jump. Instead, push an integer 1 onto the
-** stack if the jump would have been taken, or a 0 if not. Push a
-** NULL if either operand was NULL.
-*/
-case OP_StrEq:
-case OP_StrNe:
-case OP_StrLt:
-case OP_StrLe:
-case OP_StrGt:
-case OP_StrGe: {
- Mem *pNos = &pTos[-1];
- int c;
- assert( pNos>=p->aStack );
- if( (pNos->flags | pTos->flags) & MEM_Null ){
- popStack(&pTos, 2);
- if( pOp->p2 ){
- if( pOp->p1 ) pc = pOp->p2-1;
- }else{
- pTos++;
- pTos->flags = MEM_Null;
- }
- break;
- }else{
- Stringify(pTos);
- Stringify(pNos);
- c = strcmp(pNos->z, pTos->z);
- }
- /* The asserts on each case of the following switch are there to verify
- ** that string comparison opcodes are always exactly 6 greater than the
- ** corresponding numeric comparison opcodes. The code generator depends
- ** on this fact.
- */
- switch( pOp->opcode ){
- case OP_StrEq: c = c==0; assert( pOp->opcode-6==OP_Eq ); break;
- case OP_StrNe: c = c!=0; assert( pOp->opcode-6==OP_Ne ); break;
- case OP_StrLt: c = c<0; assert( pOp->opcode-6==OP_Lt ); break;
- case OP_StrLe: c = c<=0; assert( pOp->opcode-6==OP_Le ); break;
- case OP_StrGt: c = c>0; assert( pOp->opcode-6==OP_Gt ); break;
- default: c = c>=0; assert( pOp->opcode-6==OP_Ge ); break;
- }
- popStack(&pTos, 2);
- if( pOp->p2 ){
- if( c ) pc = pOp->p2-1;
- }else{
- pTos++;
- pTos->flags = MEM_Int;
- pTos->i = c;
- }
- break;
-}
/* Opcode: And * * *
**