]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Add extra OPTIMIZATION-IF-FALSE comments where required to pcache.c.
authordan <dan@noemail.net>
Thu, 12 May 2016 17:06:04 +0000 (17:06 +0000)
committerdan <dan@noemail.net>
Thu, 12 May 2016 17:06:04 +0000 (17:06 +0000)
FossilOrigin-Name: 9d55b8f541de43deb82d460d32005fd62f5430b2

manifest
manifest.uuid
src/pcache.c

index e3477b52b0d0c0ce6ac9f254d0d294c48880c07a..d2c32e5bc91f061e99aed2fc3e6d81b160aa3705 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C For\sin-memory\sdatabases,\sit\sdoes\snot\smatter\sif\spcache\sentries\sare\smarked\n"clean"\sor\s"writable".
-D 2016-05-12T12:08:48.058
+C Add\sextra\sOPTIMIZATION-IF-FALSE\scomments\swhere\srequired\sto\spcache.c.
+D 2016-05-12T17:06:04.756
 F Makefile.in 9eda6e1c90d05c199c3ec8a7069b0682ad307657
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
 F Makefile.msc db82b35aef27f412fef14d8534afc022138bcdfd
@@ -367,7 +367,7 @@ F src/os_win.h eb7a47aa17b26b77eb97e4823f20a00b8bda12ca
 F src/pager.c baef5d8d31d220001fc61013f401c98950749201
 F src/pager.h 329bdf078a4e0a3b35084534d58625d21fd03681
 F src/parse.y 10eb2f3fb62341291528c7984498054731f9d31e
-F src/pcache.c 5291b6ab838132f856fe8067ca25772d221c4864
+F src/pcache.c 3ef140add88d8d3eee3a80a79412f450bd216d3b
 F src/pcache.h 33b40350df1b6c278e019dee37f87e1bac276223
 F src/pcache1.c 7f51d2b541aab57596adf62db2c4bb025d34f04d
 F src/pragma.c faf42922bb7ab2f6672cb550356c1967abae3c84
@@ -1488,8 +1488,7 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P 0dc50d9915cd88916229ca5c3834de82fa16f017 ad601c7962a60a11699cf31f1faee09b95d5c710
-R 7667d141b3239c7f232de8ca756273cf
-T +closed ad601c7962a60a11699cf31f1faee09b95d5c710
-U drh
-Z 488a663f0afeb720045f9ee67fd9acb5
+P 06c1e27ca868f247f8c27b03eb19aac004f28650
+R e01f1d97945350d1485afdc3dc2f5468
+U dan
+Z fe74337e6648e1a589818404220bbdb0
index 90f4a0036f762de1097a39cc7d196c613b31c15a..8e69ca85acf040bf845eb484f27be5a9f9614a39 100644 (file)
@@ -1 +1 @@
-06c1e27ca868f247f8c27b03eb19aac004f28650
\ No newline at end of file
+9d55b8f541de43deb82d460d32005fd62f5430b2
\ No newline at end of file
index ee7914a4445e75a2ad035ba914d12a362b881836..f8fe9017767c4fca5c0abfb2eac98bbb6d73abaa 100644 (file)
@@ -424,8 +424,11 @@ void SQLITE_NOINLINE sqlite3PcacheRelease(PgHdr *p){
   if( (--p->nRef)==0 ){
     if( p->flags&PGHDR_CLEAN ){
       pcacheUnpin(p);
-    }else if( p->pDirtyPrev!=0 ){
-      /* Move the page to the head of the dirty list. */
+    }else if( p->pDirtyPrev!=0 ){ /*OPTIMIZATION-IF-FALSE*/
+      /* Move the page to the head of the dirty list. If p->pDirtyPrev==0,
+      ** then page p is already at the head of the dirty list and the
+      ** following call would be a no-op. Hence the OPTIMIZATION-IF-FALSE
+      ** tag above.  */
       pcacheManageDirtyList(p, PCACHE_DIRTYLIST_FRONT);
     }
   }
@@ -460,7 +463,7 @@ void sqlite3PcacheDrop(PgHdr *p){
 */
 void sqlite3PcacheMakeDirty(PgHdr *p){
   assert( p->nRef>0 );
-  if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){
+  if( p->flags & (PGHDR_CLEAN|PGHDR_DONT_WRITE) ){    /*OPTIMIZATION-IF-FALSE*/
     p->flags &= ~PGHDR_DONT_WRITE;
     if( p->flags & PGHDR_CLEAN ){
       p->flags ^= (PGHDR_DIRTY|PGHDR_CLEAN);