Reviewed by Beth Dakin.
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 17:32:11 +0000 (17:32 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2007 17:32:11 +0000 (17:32 +0000)
        Eliminated a bogus (though compiled-out) branch in the collector.

        * kjs/collector.cpp:
        (KJS::Collector::heapAllocate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@27572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/kjs/collector.cpp

index 528694b03162423ffd4ce99dabd383fa9f58fbe3..47cda088dc0ca98c763b94642d6dac277d0fc8b2 100644 (file)
@@ -1,3 +1,12 @@
+2007-11-07  Geoffrey Garen  <ggaren@apple.com>
+
+        Reviewed by Beth Dakin.
+        
+        Eliminated a bogus (though compiled-out) branch in the collector.
+
+        * kjs/collector.cpp:
+        (KJS::Collector::heapAllocate):
+
 2007-11-06  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Darin Adler.
index bc2ccd59390d5963c1ec3bc3d8f17e369709aee1..bdb3bc8b0837bfa479c6d740c58ec2b5f2fb30ad 100644 (file)
@@ -217,7 +217,7 @@ template <Collector::HeapType heapType> void* Collector::heapAllocate(size_t s)
   if (heapType == PrimaryHeap && heap.extraCost > ALLOCATIONS_PER_COLLECTION) {
       size_t numLiveObjectsAtLastCollect = heap.numLiveObjectsAtLastCollect;
       size_t numNewObjects = numLiveObjects - numLiveObjectsAtLastCollect;
-      const size_t newCost = heapType == PrimaryHeap ? numNewObjects + heap.extraCost : numNewObjects;
+      const size_t newCost = heapType == numNewObjects + heap.extraCost;
       if (newCost >= ALLOCATIONS_PER_COLLECTION && newCost >= numLiveObjectsAtLastCollect)
           goto collect;
   }
@@ -244,6 +244,7 @@ scan:
     }
     heap.firstBlockWithPossibleSpace = i;
   } else {
+
 collect:
     size_t numLiveObjectsAtLastCollect = heap.numLiveObjectsAtLastCollect;
     size_t numNewObjects = numLiveObjects - numLiveObjectsAtLastCollect;