Title: [161650] trunk/Source/_javascript_Core
Revision
161650
Author
gga...@apple.com
Date
2014-01-10 10:38:41 -0800 (Fri, 10 Jan 2014)

Log Message

Removed Blackberry #ifdefs and platform code from _javascript_Core
https://bugs.webkit.org/show_bug.cgi?id=126757

Reviewed by Sam Weinig.

* PlatformBlackBerry.cmake: Removed.
* heap/HeapTimer.cpp:
* heap/HeapTimer.h:
* heap/IncrementalSweeper.cpp:
* heap/IncrementalSweeper.h:
* jsc.cpp:
(main):
* runtime/GCActivityCallbackBlackBerry.cpp: Removed.
* runtime/MemoryStatistics.cpp:
(JSC::globalMemoryStatistics):

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (161649 => 161650)


--- trunk/Source/_javascript_Core/ChangeLog	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/ChangeLog	2014-01-10 18:38:41 UTC (rev 161650)
@@ -1,3 +1,21 @@
+2014-01-10  Geoffrey Garen  <gga...@apple.com>
+
+        Removed Blackberry #ifdefs and platform code from _javascript_Core
+        https://bugs.webkit.org/show_bug.cgi?id=126757
+
+        Reviewed by Sam Weinig.
+
+        * PlatformBlackBerry.cmake: Removed.
+        * heap/HeapTimer.cpp:
+        * heap/HeapTimer.h:
+        * heap/IncrementalSweeper.cpp:
+        * heap/IncrementalSweeper.h:
+        * jsc.cpp:
+        (main):
+        * runtime/GCActivityCallbackBlackBerry.cpp: Removed.
+        * runtime/MemoryStatistics.cpp:
+        (JSC::globalMemoryStatistics):
+
 2014-01-07  Mark Hahnenberg  <mhahnenb...@apple.com>
 
         Marking should be generational

Deleted: trunk/Source/_javascript_Core/PlatformBlackBerry.cmake (161649 => 161650)


--- trunk/Source/_javascript_Core/PlatformBlackBerry.cmake	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/PlatformBlackBerry.cmake	2014-01-10 18:38:41 UTC (rev 161650)
@@ -1,9 +0,0 @@
-list(REMOVE_ITEM _javascript_Core_SOURCES
-    runtime/GCActivityCallback.cpp
-)
-
-list(APPEND _javascript_Core_SOURCES
-    runtime/GCActivityCallbackBlackBerry.cpp
-)
-
-install(FILES "wtf/Forward.h" DESTINATION usr/include/browser/webkit/wtf)

Modified: trunk/Source/_javascript_Core/heap/HeapTimer.cpp (161649 => 161650)


--- trunk/Source/_javascript_Core/heap/HeapTimer.cpp	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/heap/HeapTimer.cpp	2014-01-10 18:38:41 UTC (rev 161650)
@@ -100,30 +100,6 @@
     apiLock->unlock();
 }
 
-#elif PLATFORM(BLACKBERRY)
-
-HeapTimer::HeapTimer(VM* vm)
-    : m_vm(vm)
-    , m_timer(this, &HeapTimer::timerDidFire)
-{
-    // FIXME: Implement HeapTimer for other threads.
-    if (WTF::isMainThread() && !m_timer.tryCreateClient())
-        CRASH();
-}
-
-HeapTimer::~HeapTimer()
-{
-}
-
-void HeapTimer::timerDidFire()
-{
-    doWork();
-}
-
-void HeapTimer::invalidate()
-{
-}
-
 #elif PLATFORM(EFL)
 
 HeapTimer::HeapTimer(VM* vm)

Modified: trunk/Source/_javascript_Core/heap/HeapTimer.h (161649 => 161650)


--- trunk/Source/_javascript_Core/heap/HeapTimer.h	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/heap/HeapTimer.h	2014-01-10 18:38:41 UTC (rev 161650)
@@ -31,8 +31,6 @@
 
 #if USE(CF)
 #include <CoreFoundation/CoreFoundation.h>
-#elif PLATFORM(BLACKBERRY)
-#include <BlackBerryPlatformTimer.h>
 #elif PLATFORM(EFL)
 #if USE(EO)
 typedef struct _Eo_Opaque Ecore_Timer;
@@ -68,10 +66,6 @@
     CFRunLoopTimerContext m_context;
 
     Mutex m_shutdownMutex;
-#elif PLATFORM(BLACKBERRY)
-    void timerDidFire();
-
-    BlackBerry::Platform::Timer<HeapTimer> m_timer;
 #elif PLATFORM(EFL)
     static bool timerEvent(void*);
     Ecore_Timer* add(double delay, void* agent);

Modified: trunk/Source/_javascript_Core/heap/IncrementalSweeper.cpp (161649 => 161650)


--- trunk/Source/_javascript_Core/heap/IncrementalSweeper.cpp	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/heap/IncrementalSweeper.cpp	2014-01-10 18:38:41 UTC (rev 161650)
@@ -38,14 +38,12 @@
 
 namespace JSC {
 
-#if USE(CF) || PLATFORM(BLACKBERRY)
+#if USE(CF)
 
 static const double sweepTimeSlice = .01; // seconds
 static const double sweepTimeTotal = .10;
 static const double sweepTimeMultiplier = 1.0 / sweepTimeTotal;
 
-#if USE(CF)
-    
 IncrementalSweeper::IncrementalSweeper(Heap* heap, CFRunLoopRef runLoop)
     : HeapTimer(heap->vm(), runLoop)
     , m_currentBlockToSweepIndex(0)
@@ -68,32 +66,6 @@
     CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
 }
 
-#elif PLATFORM(BLACKBERRY)
-   
-IncrementalSweeper::IncrementalSweeper(Heap* heap)
-    : HeapTimer(heap->vm())
-    , m_currentBlockToSweepIndex(0)
-    , m_blocksToSweep(heap->m_blockSnapshot)
-{
-}
-
-PassOwnPtr<IncrementalSweeper> IncrementalSweeper::create(Heap* heap)
-{
-    return adoptPtr(new IncrementalSweeper(heap));
-}
-
-void IncrementalSweeper::scheduleTimer()
-{
-    m_timer.start(sweepTimeSlice * sweepTimeMultiplier);
-}
-
-void IncrementalSweeper::cancelTimer()
-{
-    m_timer.stop();
-}
-
-#endif
-
 void IncrementalSweeper::doWork()
 {
     doSweep(WTF::monotonicallyIncreasingTime());

Modified: trunk/Source/_javascript_Core/heap/IncrementalSweeper.h (161649 => 161650)


--- trunk/Source/_javascript_Core/heap/IncrementalSweeper.h	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/heap/IncrementalSweeper.h	2014-01-10 18:38:41 UTC (rev 161650)
@@ -46,13 +46,11 @@
 protected:
 #if USE(CF)
     JS_EXPORT_PRIVATE IncrementalSweeper(Heap*, CFRunLoopRef);
-#elif PLATFORM(BLACKBERRY)
-    IncrementalSweeper(Heap*);
 #else
     IncrementalSweeper(VM*);
 #endif
 
-#if USE(CF) || PLATFORM(BLACKBERRY)
+#if USE(CF)
 private:
     void doSweep(double startTime);
     void scheduleTimer();

Modified: trunk/Source/_javascript_Core/jsc.cpp (161649 => 161650)


--- trunk/Source/_javascript_Core/jsc.cpp	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/jsc.cpp	2014-01-10 18:38:41 UTC (rev 161650)
@@ -85,10 +85,6 @@
 #include <arm/arch.h>
 #endif
 
-#if PLATFORM(BLACKBERRY)
-#include <BlackBerryPlatformLog.h>
-#endif
-
 #if PLATFORM(EFL)
 #include <Ecore.h>
 #endif
@@ -590,11 +586,6 @@
     timeBeginPeriod(1);
 #endif
 
-#if PLATFORM(BLACKBERRY)
-    // Write all WTF logs to the system log
-    BlackBerry::Platform::setupApplicationLogging("jsc");
-#endif
-
 #if PLATFORM(EFL)
     ecore_init();
 #endif

Deleted: trunk/Source/_javascript_Core/runtime/GCActivityCallbackBlackBerry.cpp (161649 => 161650)


--- trunk/Source/_javascript_Core/runtime/GCActivityCallbackBlackBerry.cpp	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/runtime/GCActivityCallbackBlackBerry.cpp	2014-01-10 18:38:41 UTC (rev 161650)
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Research In Motion Limited. All rights reserved.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#include "config.h"
-#include "GCActivityCallback.h"
-
-#include "Heap.h"
-#include "VM.h"
-#include <BlackBerryPlatformMemory.h>
-
-namespace JSC {
-
-DefaultGCActivityCallback::DefaultGCActivityCallback(Heap* heap)
-    : GCActivityCallback(heap->vm())
-{
-}
-
-void DefaultGCActivityCallback::doWork()
-{
-    JSLockHolder lock(m_vm);
-    m_vm->heap.collect(Heap::DoNotSweep);
-}
-
-void DefaultGCActivityCallback::didAllocate(size_t)
-{
-    if (m_timer.started())
-        return;
-
-    // Try using ~5% CPU time.
-    m_timer.start(m_vm->heap.lastGCLength() * 20);
-}
-
-void DefaultGCActivityCallback::willCollect()
-{
-    cancel();
-}
-
-void DefaultGCActivityCallback::cancel()
-{
-    m_timer.stop();
-}
-
-}

Modified: trunk/Source/_javascript_Core/runtime/MemoryStatistics.cpp (161649 => 161650)


--- trunk/Source/_javascript_Core/runtime/MemoryStatistics.cpp	2014-01-10 18:22:59 UTC (rev 161649)
+++ trunk/Source/_javascript_Core/runtime/MemoryStatistics.cpp	2014-01-10 18:38:41 UTC (rev 161650)
@@ -37,7 +37,7 @@
     GlobalMemoryStatistics stats;
 
     stats.stackBytes = JSStack::committedByteCount();
-#if ENABLE(EXECUTABLE_ALLOCATOR_FIXED) || ((PLATFORM(BLACKBERRY) || PLATFORM(EFL)) && ENABLE(JIT))
+#if ENABLE(EXECUTABLE_ALLOCATOR_FIXED) || (PLATFORM(EFL) && ENABLE(JIT))
     stats.JITBytes = ExecutableAllocator::committedByteCount();
 #else
     stats.JITBytes = 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to