From: drh Date: Tue, 2 Jun 2009 16:06:03 +0000 (+0000) Subject: Tweaks to vdbe.c to further reduce stack space requirements. (CVS 6706) X-Git-Tag: version-3.6.15~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c54a617e1ff59a717960a876977b7c56f2276715;p=thirdparty%2Fsqlite.git Tweaks to vdbe.c to further reduce stack space requirements. (CVS 6706) FossilOrigin-Name: 6f2aab3f7be12710b703eda22b1d5c0e8f85f814 --- diff --git a/manifest b/manifest index 3db5d28f63..1107541275 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Add\sa\stest\scase\sfor\sticket\s#3893\sand\sticket\s#3894.\s(CVS\s6705) -D 2009-06-02T15:47:38 +C Tweaks\sto\svdbe.c\sto\sfurther\sreduce\sstack\sspace\srequirements.\s(CVS\s6706) +D 2009-06-02T16:06:04 F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0 F Makefile.in 8b8fb7823264331210cddf103831816c286ba446 F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654 @@ -203,7 +203,7 @@ F src/update.c 6ae6c26adff8dc34532d578f66e6cfde04b5d177 F src/utf.c 9541d28f40441812c0b40f00334372a0542c00ff F src/util.c a9719d309f6c65b3b79fa3ca8512fa8e3947a391 F src/vacuum.c 981686c910b2ff9fe3db814e01da31cf9dbd48c7 -F src/vdbe.c 2f2c4b5a1b92cdbae31f5c5d5a380c697fa3dcc4 +F src/vdbe.c 6bb5bc95316784d67deaa84e2a158d28595abeee F src/vdbe.h 35a648bc3279a120da24f34d9a25213ec15daf8a F src/vdbeInt.h 43183a2a18654fa570219ab65e53a608057c48ae F src/vdbeapi.c 86aa27a5f3493aaffb8ac051782aa3b22670d7ed @@ -731,8 +731,8 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81 F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224 F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e -F tool/vdbe-compress.tcl 383f4be3ceb8cec24f31f27480232fbb866fd83a -P 7f43391831b03e53d967acee6ae02089740aaedb -R b31694ba92374d717dd008daf81bde48 +F tool/vdbe-compress.tcl 672f81d693a03f80f5ae60bfefacd8a349e76746 +P 2472f6db95cd537a908bdbbbbc41bad2bd987b2f +R 57397b8b65ede5893d2dad509980c211 U drh -Z 478edb6360b0cd2be154f1dd2a044a7c +Z 17489243ec8afd4b7332979c8573eb17 diff --git a/manifest.uuid b/manifest.uuid index 02ff77fecb..ed32c6c967 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -2472f6db95cd537a908bdbbbbc41bad2bd987b2f \ No newline at end of file +6f2aab3f7be12710b703eda22b1d5c0e8f85f814 \ No newline at end of file diff --git a/src/vdbe.c b/src/vdbe.c index 326efc91b5..e9321eea3f 100644 --- a/src/vdbe.c +++ b/src/vdbe.c @@ -43,7 +43,7 @@ ** 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.844 2009/06/02 15:21:42 drh Exp $ +** $Id: vdbe.c,v 1.845 2009/06/02 16:06:04 drh Exp $ */ #include "sqliteInt.h" #include "vdbeInt.h" @@ -1940,7 +1940,9 @@ case OP_IfNot: { /* jump, in1 */ ** reg(P1+2), ..., reg(P1+P3-1). */ case OP_IsNull: { /* same as TK_ISNULL, jump, in1 */ - int n = pOp->p3; + int n; + + n = pOp->p3; assert( pOp->p3==0 || pOp->p1>0 ); do{ if( (pIn1->flags & MEM_Null)!=0 ){ @@ -2398,7 +2400,9 @@ case OP_MakeRecord: { #ifndef SQLITE_OMIT_BTREECOUNT case OP_Count: { /* out2-prerelease */ i64 nEntry; - BtCursor *pCrsr = p->apCsr[pOp->p1]->pCursor; + BtCursor *pCrsr; + + pCrsr = p->apCsr[pOp->p1]->pCursor; if( pCrsr ){ rc = sqlite3BtreeCount(pCrsr, &nEntry); }else{ @@ -3100,7 +3104,8 @@ case OP_OpenPseudo: { ** currently open, this instruction is a no-op. */ case OP_Close: { - int i = pOp->p1; + int i; + i = pOp->p1; assert( i>=0 && inCursor ); sqlite3VdbeFreeCursor(p, p->apCsr[i]); p->apCsr[i] = 0; @@ -4882,7 +4887,8 @@ case OP_IfZero: { /* jump, in1 */ case OP_AggStep: { int n; int i; - Mem *pMem, *pRec; + Mem *pMem; + Mem *pRec; sqlite3_context ctx; sqlite3_value **apVal; @@ -5278,9 +5284,10 @@ case OP_VColumn: { case OP_VNext: { /* jump */ sqlite3_vtab *pVtab; const sqlite3_module *pModule; - int res = 0; + int res; VdbeCursor *pCur; + res = 0; pCur = p->apCsr[pOp->p1]; assert( pCur->pVtabCursor ); if( pCur->nullRow ){ diff --git a/tool/vdbe-compress.tcl b/tool/vdbe-compress.tcl index 81f2da06d5..6aa902df70 100644 --- a/tool/vdbe-compress.tcl +++ b/tool/vdbe-compress.tcl @@ -64,7 +64,7 @@ while {![eof stdin]} { set vlist {} while {![eof stdin]} { set line [gets stdin] - if {[regexp {^ +(const )?\w+ \*?(\w+)(\[.*\])?;} $line \ + if {[regexp {^ +(const )?\w+ \**(\w+)(\[.*\])?;} $line \ all constKeyword vname notused1]} { if {!$seenDecl} { set sname {}