]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Comment changes to the lemon parser template. Change some sqliteMalloc() calls
authordrh <drh@noemail.net>
Wed, 22 Oct 2003 22:15:27 +0000 (22:15 +0000)
committerdrh <drh@noemail.net>
Wed, 22 Oct 2003 22:15:27 +0000 (22:15 +0000)
to sqliteMallocRaw() for speed.  Update the website template. (CVS 1114)

FossilOrigin-Name: c637caf13f579959ecdb6b134d0114e8efbcac60

manifest
manifest.uuid
src/btree_rb.c
src/util.c
tool/lempar.c
www/index.tcl

index 33a5cdda09c9f1bdd26680b98620664fd031814b..144338793ac81b5337efe9c39bbadbcb2fcc70cb 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C Fix\sbugs\sin\slemon\sassociated\swith\sthe\schange\sto\sa\sperfect\shash\stable.\s(CVS\s1113)
-D 2003-10-21T16:34:42
+C Comment\schanges\sto\sthe\slemon\sparser\stemplate.\s\sChange\ssome\ssqliteMalloc()\scalls\nto\ssqliteMallocRaw()\sfor\sspeed.\s\sUpdate\sthe\swebsite\stemplate.\s(CVS\s1114)
+D 2003-10-22T22:15:28
 F Makefile.in ab585a91e34bc33928a1b6181fa2f6ebd4fb17e1
 F Makefile.linux-gcc b86a99c493a5bfb402d1d9178dcdc4bd4b32f906
 F README f1de682fbbd94899d50aca13d387d1b3fd3be2dd
@@ -25,7 +25,7 @@ F src/attach.c 9f78b4aaac02a2b09ff108e92cbaee3199e7962a
 F src/auth.c c8f50d4507e37779d96ff3c55417bc2b612dfed6
 F src/btree.c ba1cc0c71c3d2742b9a9047832335dc7d3656c45
 F src/btree.h 9b7c09f1e64274d7bb74a57bbfc63778f67b1048
-F src/btree_rb.c 550ce12841a87380554abae4442571567463de3a
+F src/btree_rb.c 67d154ffb0fac27a4a7eab9118ece6eaafeb49c9
 F src/build.c 9def3a3b8fba59325ed686049b88c2e7aff9af12
 F src/copy.c 9e47975ea96751c658bcf1a0c4f0bb7c6ee61e73
 F src/delete.c 0f81e6799c089487615d38e042a2de4d2d6192bc
@@ -59,7 +59,7 @@ F src/threadtest.c d641a5219e718e18a1a80a50eb9bb549f451f42e
 F src/tokenize.c e14db6bfa972a7c449c80788fcdbc0fdc11b17d7
 F src/trigger.c ce83e017b407d046e909d05373d7f8ee70f9f7f9
 F src/update.c 24260b4fda00c9726d27699a0561d53c0dccc397
-F src/util.c f16efa2d60bfd4e31ae06b07ed149557e828d294
+F src/util.c cc95dd360fac09a059b2ab98e4c333d1a2308db5
 F src/vacuum.c e4724eade07e4cf8897060a8cf632dbd92408eeb
 F src/vdbe.c 0928a242ced0b5d26292f3949fdab26fa4dc327d
 F src/vdbe.h 3957844e46fea71fd030e78f6a3bd2f7e320fb43
@@ -139,7 +139,7 @@ F test/view.test 1ee12c6f8f4791a2c0655120d5562a49400cfe53
 F test/where.test cb3a2ed062ce4b5f08aff2d08027c6a46d68c47b
 F tool/diffdb.c 7524b1b5df217c20cd0431f6789851a4e0cb191b
 F tool/lemon.c e37dcb5b8cdb16f4ac98338134bf8d8cd28e399f
-F tool/lempar.c 043b18f4e82012f48240e44aa68d9b95bdf431cc
+F tool/lempar.c 686d85ff4b11a790f52dd033612e6890a2a10f3c
 F tool/memleak.awk 16ef9493dcd36146f806e75148f4bb0201a123ec
 F tool/memleak2.awk 9cc20c8e8f3c675efac71ea0721ee6874a1566e8
 F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e x
@@ -163,7 +163,7 @@ F www/dynload.tcl 02eb8273aa78cfa9070dd4501dca937fb22b466c
 F www/faq.tcl 88d3b95d9cd8e374772daa3a646c4d107e7f3e9b
 F www/fileformat.tcl ae6ccf3ffddb180a5af173cd6ee102169629762b
 F www/formatchng.tcl ca6cc1cb1bef9bc36f0619049d3c95e749bc6983
-F www/index.tcl 2915a79faaaf7441976948ae095da6ff63aff5c0
+F www/index.tcl 3530ab3c43e2f34f114d16495d19cc1751d12446
 F www/lang.tcl 5f39bbda1ba38a28f18f97bd98c81f40355393b2
 F www/mingw.tcl d96b451568c5d28545fefe0c80bee3431c73f69c
 F www/nulls.tcl 9cb56d98c0c623074cda4360a415f3f0a7074c90
@@ -174,7 +174,7 @@ F www/speed.tcl 2f6b1155b99d39adb185f900456d1d592c4832b3
 F www/sqlite.tcl 3c83b08cf9f18aa2d69453ff441a36c40e431604
 F www/tclsqlite.tcl b9271d44dcf147a93c98f8ecf28c927307abd6da
 F www/vdbe.tcl 9b9095d4495f37697fd1935d10e14c6015e80aa1
-P 4f955c00076b16166ff837749efb84201eab3c3a
-R 476d560510b73636a2e46afa340dadeb
+P c0d1b26966aeb445fea5792e5a9e93632e758c2a
+R 2cd08c2a268077f9c1fb1e5464683f42
 U drh
-Z e55c6ef0dbc0e0ad2050ca7323671ea5
+Z e34714b150e14d157798b16491a3dc4f
index 6315e6efa62b3e7e3a6f2756b655ec36b4c30f09..af625f571951741cd0e9624d77676d04e7c49891 100644 (file)
@@ -1 +1 @@
-c0d1b26966aeb445fea5792e5a9e93632e758c2a
\ No newline at end of file
+c637caf13f579959ecdb6b134d0114e8efbcac60
\ No newline at end of file
index 5981b11e9b11e73335d4e22d48b8c50d08f6865d..4febeeb55389bab56950c47764cbdbf8fe299f94 100644 (file)
@@ -9,7 +9,7 @@
 **    May you share freely, never taking more than you give.
 **
 *************************************************************************
-** $Id: btree_rb.c,v 1.16 2003/08/27 22:57:08 drh Exp $
+** $Id: btree_rb.c,v 1.17 2003/10/22 22:15:28 drh Exp $
 **
 ** This file implements an in-core database using Red-Black balanced
 ** binary trees.
@@ -754,7 +754,7 @@ static int memRbtreeInsert(
 
   /* Take a copy of the input data now, in case we need it for the 
    * replace case */
-  pData = sqliteMalloc(nData);
+  pData = sqliteMallocRaw(nData);
   memcpy(pData, pDataInput, nData);
 
   /* Move the cursor to a node near the key to be inserted. If the key already
@@ -772,7 +772,7 @@ static int memRbtreeInsert(
   if( match ){
     BtRbNode *pNode = sqliteMalloc(sizeof(BtRbNode));
     pNode->nKey = nKey;
-    pNode->pKey = sqliteMalloc(nKey);
+    pNode->pKey = sqliteMallocRaw(nKey);
     memcpy(pNode->pKey, pKey, nKey);
     pNode->nData = nData;
     pNode->pData = pData; 
@@ -807,7 +807,7 @@ static int memRbtreeInsert(
       pOp->eOp = ROLLBACK_DELETE;
       pOp->iTab = pCur->iTree;
       pOp->nKey = pNode->nKey;
-      pOp->pKey = sqliteMalloc( pOp->nKey );
+      pOp->pKey = sqliteMallocRaw( pOp->nKey );
       memcpy( pOp->pKey, pNode->pKey, pOp->nKey );
       btreeLogRollbackOp(pCur->pRbtree, pOp);
     }
@@ -821,7 +821,7 @@ static int memRbtreeInsert(
       BtRollbackOp *pOp = sqliteMalloc( sizeof(BtRollbackOp) );
       pOp->iTab = pCur->iTree;
       pOp->nKey = pCur->pNode->nKey;
-      pOp->pKey = sqliteMalloc( pOp->nKey );
+      pOp->pKey = sqliteMallocRaw( pOp->nKey );
       memcpy( pOp->pKey, pCur->pNode->pKey, pOp->nKey );
       pOp->nData = pCur->pNode->nData;
       pOp->pData = pCur->pNode->pData;
@@ -1028,7 +1028,7 @@ static int memRbtreeClearTable(Rbtree* tree, int n)
         sqliteFree( pNode->pKey );
         sqliteFree( pNode->pData );
       }else{
-        BtRollbackOp *pRollbackOp = sqliteMalloc(sizeof(BtRollbackOp));
+        BtRollbackOp *pRollbackOp = sqliteMallocRaw(sizeof(BtRollbackOp));
         pRollbackOp->eOp = ROLLBACK_INSERT;
         pRollbackOp->iTab = n;
         pRollbackOp->nKey = pNode->nKey;
index bc1257fe715c6a9428b3a3c69bac25a6804374a9..fc84c1734f42c5b79173b3dcd0911c6b3fed2caa 100644 (file)
@@ -14,7 +14,7 @@
 ** This file contains functions for allocating memory, comparing
 ** strings, and stuff like that.
 **
-** $Id: util.c,v 1.67 2003/08/26 11:29:08 drh Exp $
+** $Id: util.c,v 1.68 2003/10/22 22:15:28 drh Exp $
 */
 #include "sqliteInt.h"
 #include <stdarg.h>
@@ -251,13 +251,11 @@ char *sqliteStrNDup_(const char *z, int n, char *zFile, int line){
 */
 void *sqliteMalloc(int n){
   void *p;
-  if( n==0 ) return 0;
-  p = malloc(n);
-  if( p==0 ){
+  if( (p = malloc(n))==0 ){
     sqlite_malloc_failed++;
-    return 0;
+  }else{
+    memset(p, 0, n);
   }
-  memset(p, 0, n);
   return p;
 }
 
@@ -267,11 +265,8 @@ void *sqliteMalloc(int n){
 */
 void *sqliteMallocRaw(int n){
   void *p;
-  if( n==0 ) return 0;
-  p = malloc(n);
-  if( p==0 ){
+  if( (p = malloc(n))==0 ){
     sqlite_malloc_failed++;
-    return 0;
   }
   return p;
 }
index 225c3020e1640cf13028b0d8e5e74caa45aba1f8..bf262c3fc781a7977d3f4613c39f2d2561461d7e 100644 (file)
 ** functions that take a state number and lookahead value and return an
 ** action integer.  
 **
-** The action integer is a number N between
-** 0 and YYNSTATE-1 mean shift the look-ahead and go to state N.
-** Numbers between YYNSTATE and YYNSTATE+YYNRULE-1 mean reduce by
-** rule N-YYNSTATE.  Number YYNSTATE+YYNRULE means that a syntax
-** error has occurred.  Number YYNSTATE+YYNRULE+1 means the parser
-** accepts its input.
+** Suppose the action integer is N.  Then the action is determined as
+** follows
 **
-** The action table is constructed as a single large hash table with
-** a perfect hash.  Given state S and lookahead X, the action is computed
-** as
+**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
+**                                      token onto the stack and goto state N.
+**
+**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
+**
+**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
+**
+**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
+**
+**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
+**                                      slots in the yy_action[] table.
+**
+** The action table is constructed as a single large table named yy_action[].
+** Given state S and lookahead X, the action is computed as
 **
 **      yy_action[ yy_shift_ofst[S] + X ]
 **
-** If the index yy_shift_ofst[S]+X is out of range or if the value
+** If the index value yy_shift_ofst[S]+X is out of range or if the value
 ** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
 ** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
 ** and that yy_default[S] should be used instead.  
index e8576e700e407f2bb458318f140a4020540ba06f..024f86b0364adf8ca65115b40cc8ca604babb272 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Run this TCL script to generate HTML for the index.html file.
 #
-set rcsid {$Id: index.tcl,v 1.78 2003/08/22 02:34:30 drh Exp $}
+set rcsid {$Id: index.tcl,v 1.79 2003/10/22 22:15:28 drh Exp $}
 
 puts {<html>
 <head><title>SQLite: An Embeddable SQL Database Engine</title></head>
@@ -70,7 +70,8 @@ three functions and one opaque structure.</li>
 <li>Automated test suite provides near 100% code coverage.</li>
 <li>Self-contained: no external dependencies.</li>
 <li>Built and tested under Linux and Windows.</li>
-<li>Sources are in the public domain.  Use for any purpose.</li>
+<li>Sources are in the <a href="copyright.html">public domain</a>.
+    Use for any purpose.</li>
 </ul>
 </p>
 }
@@ -149,17 +150,23 @@ another important source of information.  </p>
 }
 
 puts {
-<table align="right">
-<tr><td align="center">
-<a href="http://www.yahoogroups.com/subscribe/sqlite">
-<img src="http://www.egroups.com/img/ui/join.gif" border=0 /><br />
-Click to subscribe to sqlite</a>
-</td></tr>
-</table>
 <a name="mailinglist" />
 <h2>Mailing List</h2>
-<p>A mailing list has been set up on yahooGroups for discussion of
-SQLite design issues or for asking questions about SQLite.</p>
+<p>A mailing list has been set up for discussion of
+SQLite design issues or for asking questions about SQLite.
+To subscribe send an email to
+<a href="mailto:sqlite-users-subscribe@sqlite.org">
+sqlite-users-subscribe@sqlite.org</a>.
+If you would prefer to get digests rather than individual
+emails, send a message to to
+<a href="mailto:sqlite-users-digest-subscribe@sqlite.org">
+sqlite-users-digest-subscribe@sqlite.org</a>.
+For additional information about operating and using this
+mailing list, send a message to
+<a href="mailto:sqlite-users-help@sqlite.org">
+sqlite-users-help@sqlite.org</a> and instructions will be
+sent by to you by return email.
+</p>
 }
 
 puts {<h2>Professional Support and Custom Modifications</h2>}