mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-08 03:22:21 +03:00
Do not include the P3 parameter on OP_Integer opcodes if the integer will fit
in 32 bits. The P3 conversion is slow. (CVS 1494) FossilOrigin-Name: fcd84ebabca72023e76e6954514948aa9a3ab999
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
** This file contains routines used for analyzing expressions and
|
||||
** for generating VDBE code that evaluates expressions in SQLite.
|
||||
**
|
||||
** $Id: expr.c,v 1.132 2004/05/29 11:24:50 danielk1977 Exp $
|
||||
** $Id: expr.c,v 1.133 2004/05/30 01:38:43 drh Exp $
|
||||
*/
|
||||
#include "sqliteInt.h"
|
||||
#include <ctype.h>
|
||||
@@ -1068,8 +1068,10 @@ int sqlite3ExprType(Expr *p){
|
||||
*/
|
||||
static void codeInteger(Vdbe *v, const char *z, int n){
|
||||
int i;
|
||||
if( sqlite3GetInt32(z, &i) || (i=0, sqlite3FitsIn64Bits(z))!=0 ){
|
||||
sqlite3VdbeOp3(v, OP_Integer, i, 0, z, n);
|
||||
if( sqlite3GetInt32(z, &i) ){
|
||||
sqlite3VdbeAddOp(v, OP_Integer, i, 0);
|
||||
}else if( sqlite3FitsIn64Bits(z) ){
|
||||
sqlite3VdbeOp3(v, OP_Integer, 0, 0, z, n);
|
||||
}else{
|
||||
sqlite3VdbeOp3(v, OP_Real, 0, 0, z, n);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user