Try to fix 32bit build.
authorggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 08:12:42 +0000 (08:12 +0000)
committerggaren@apple.com <ggaren@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Feb 2011 08:12:42 +0000 (08:12 +0000)
* runtime/Heap.cpp:
(JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
since 1.5 is double (64bit), and the result is size_t (32bit).

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

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/Heap.cpp

index db1cf207c174f775c63416be01aa485d0e2ef835..bc77dbab80765233cddfdd4bbd9163b0d4af14bd 100644 (file)
@@ -1,3 +1,11 @@
+2011-02-04  Geoffrey Garen  <ggaren@apple.com>
+
+        Try to fix 32bit build.
+
+        * runtime/Heap.cpp:
+        (JSC::Heap::reset): Use an explicit cast to avoid shortening warnings,
+        since 1.5 is double (64bit), and the result is size_t (32bit).
+
 2011-02-03  Geoffrey Garen  <ggaren@apple.com>
 
         Reviewed by Cameron Zwarich.
index 20fae80de10f66207b453df7cf0a30d06fa6325f..72d7188b868ce653c70d59c2ac854e55a8bb778b 100644 (file)
@@ -387,7 +387,7 @@ void Heap::reset(SweepToggle sweepToggle)
         m_markedSpace.sweep();
 
     size_t usedCellCount = m_markedSpace.markedCells();
-    size_t proportionalBytes = usedCellCount * 1.5 * HeapConstants::cellSize;
+    size_t proportionalBytes = static_cast<size_t>(usedCellCount * 1.5 * HeapConstants::cellSize);
     m_markedSpace.setHighWaterMark(max(proportionalBytes, minBytesPerCycle));
 
     JAVASCRIPTCORE_GC_END();