Bug 1568740 - (part 3) Nursery::roundSize should be a static member r=jonco
authorPaul Bone <pbone@mozilla.com>
Wed, 31 Jul 2019 04:07:04 +0000
changeset 486146 5c978eb8f1af3b1c3c545a17b0c63e9053e0437f
parent 486145 7b6e6a8c7bec0c330f66a6cf40f4c9fa5aa77e63
child 486147 bb6a6819da31213ad478015c62509d68b9c5a023
push id36390
push usercbrindusan@mozilla.com
push dateMon, 05 Aug 2019 09:54:13 +0000
treeherdermozilla-central@d681969e4480 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1568740
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1568740 - (part 3) Nursery::roundSize should be a static member r=jonco Differential Revision: https://phabricator.services.mozilla.com/D39282
js/src/gc/Nursery.cpp
js/src/gc/Nursery.h
--- a/js/src/gc/Nursery.cpp
+++ b/js/src/gc/Nursery.cpp
@@ -1439,17 +1439,17 @@ bool js::Nursery::maybeResizeExact(JS::G
     MOZ_ASSERT(minNurseryBytes <= roundSize(tunables().gcMaxNurseryBytes()));
     growAllocableSpace(minNurseryBytes);
     return true;
   }
 
   return false;
 }
 
-size_t js::Nursery::roundSize(size_t size) const {
+size_t js::Nursery::roundSize(size_t size) {
   if (size >= ChunkSize) {
     size = JS_ROUND(size, ChunkSize);
   } else {
     size = Min(JS_ROUND(size, SubChunkStep),
                JS_ROUNDDOWN(NurseryChunkUsableSize, SubChunkStep));
   }
   return size;
 }
--- a/js/src/gc/Nursery.h
+++ b/js/src/gc/Nursery.h
@@ -602,17 +602,17 @@ class Nursery {
   void clear();
 
   void sweepDictionaryModeObjects();
   void sweepMapAndSetObjects();
 
   // Change the allocable space provided by the nursery.
   void maybeResizeNursery(JS::GCReason reason);
   bool maybeResizeExact(JS::GCReason reason);
-  size_t roundSize(size_t size) const;
+  static size_t roundSize(size_t size);
   void growAllocableSpace(size_t newCapacity);
   void shrinkAllocableSpace(size_t newCapacity);
   void minimizeAllocableSpace();
 
   // Free the chunks starting at firstFreeChunk until the end of the chunks
   // vector. Shrinks the vector but does not update maxChunkCount().
   void freeChunksFrom(unsigned firstFreeChunk);