Changeset 212464 in webkit


Ignore:
Timestamp:
Feb 16, 2017 2:28:54 PM (7 years ago)
Author:
andersca@apple.com
Message:

Remove EFL from JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=168459

Reviewed by Geoffrey Garen.

  • heap/GCActivityCallback.cpp:

(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::cancelTimer):
(JSC::GCActivityCallback::didAllocate):

  • heap/GCActivityCallback.h:
  • heap/HeapTimer.cpp:

(JSC::HeapTimer::add): Deleted.
(JSC::HeapTimer::stop): Deleted.
(JSC::HeapTimer::timerEvent): Deleted.

  • heap/HeapTimer.h:
  • inspector/EventLoop.cpp:

(Inspector::EventLoop::cycle):

  • jsc.cpp:

(main):

  • tools/CodeProfiling.cpp:

(JSC::CodeProfiling::begin):
(JSC::CodeProfiling::end):

Location:
trunk/Source/JavaScriptCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r212462 r212464  
     12017-02-16  Anders Carlsson  <andersca@apple.com>
     2
     3        Remove EFL from JavaScriptCore
     4        https://bugs.webkit.org/show_bug.cgi?id=168459
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * heap/GCActivityCallback.cpp:
     9        (JSC::GCActivityCallback::GCActivityCallback):
     10        (JSC::GCActivityCallback::cancelTimer):
     11        (JSC::GCActivityCallback::didAllocate):
     12        * heap/GCActivityCallback.h:
     13        * heap/HeapTimer.cpp:
     14        (JSC::HeapTimer::add): Deleted.
     15        (JSC::HeapTimer::stop): Deleted.
     16        (JSC::HeapTimer::timerEvent): Deleted.
     17        * heap/HeapTimer.h:
     18        * inspector/EventLoop.cpp:
     19        (Inspector::EventLoop::cycle):
     20        * jsc.cpp:
     21        (main):
     22        * tools/CodeProfiling.cpp:
     23        (JSC::CodeProfiling::begin):
     24        (JSC::CodeProfiling::end):
     25
    1262017-02-15  Brian Burg  <bburg@apple.com>
    227
  • trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp

    r211631 r212464  
    3535#include "VM.h"
    3636
    37 #if PLATFORM(EFL)
    38 #include <wtf/MainThread.h>
    39 #elif USE(GLIB)
     37#if USE(GLIB)
    4038#include <glib.h>
    4139#endif
     
    5250GCActivityCallback::GCActivityCallback(Heap* heap)
    5351    : GCActivityCallback(heap->vm())
    54 {
    55 }
    56 #elif PLATFORM(EFL)
    57 GCActivityCallback::GCActivityCallback(Heap* heap)
    58     : GCActivityCallback(heap->vm(), WTF::isMainThread())
    5952{
    6053}
     
    9891    CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade);
    9992}
    100 #elif PLATFORM(EFL)
    101 void GCActivityCallback::scheduleTimer(double newDelay)
    102 {
    103     if (newDelay * timerSlop > m_delay)
    104         return;
    105 
    106     stop();
    107     m_delay = newDelay;
    108    
    109     ASSERT(!m_timer);
    110     m_timer = add(newDelay, this);
    111 }
    112 
    113 void GCActivityCallback::cancelTimer()
    114 {
    115     m_delay = s_hour;
    116     stop();
    117 }
    11893#elif USE(GLIB)
    11994void GCActivityCallback::scheduleTimer(double newDelay)
     
    150125void GCActivityCallback::didAllocate(size_t bytes)
    151126{
    152 #if PLATFORM(EFL)
    153     if (!isEnabled())
    154         return;
    155 
    156     ASSERT(WTF::isMainThread());
    157 #endif
    158 
    159127    // The first byte allocated in an allocation cycle will report 0 bytes to didAllocate.
    160128    // We pretend it's one byte so that we don't ignore this allocation entirely.
  • trunk/Source/JavaScriptCore/heap/GCActivityCallback.h

    r211631 r212464  
    7676    {
    7777    }
    78 #elif PLATFORM(EFL)
    79     static constexpr double s_hour = 3600;
    80     GCActivityCallback(VM* vm, bool flag)
    81         : HeapTimer(vm)
    82         , m_enabled(flag)
    83         , m_delay(s_hour)
    84     {
    85     }
    8678#elif USE(GLIB)
    8779    GCActivityCallback(VM* vm)
  • trunk/Source/JavaScriptCore/heap/HeapTimer.cpp

    r208306 r212464  
    3535#include <wtf/Threading.h>
    3636
    37 #if PLATFORM(EFL)
    38 #include <Ecore.h>
    39 #elif USE(GLIB)
     37#if USE(GLIB)
    4038#include <glib.h>
    4139#endif
     
    109107}
    110108
    111 #elif PLATFORM(EFL)
    112 
    113 HeapTimer::HeapTimer(VM* vm)
    114     : m_vm(vm)
    115     , m_apiLock(&vm->apiLock())
    116     , m_timer(0)
    117 {
    118 }
    119 
    120 HeapTimer::~HeapTimer()
    121 {
    122     stop();
    123 }
    124 
    125 Ecore_Timer* HeapTimer::add(double delay, void* agent)
    126 {
    127     return ecore_timer_add(delay, reinterpret_cast<Ecore_Task_Cb>(timerEvent), agent);
    128 }
    129    
    130 void HeapTimer::stop()
    131 {
    132     if (!m_timer)
    133         return;
    134 
    135     ecore_timer_del(m_timer);
    136     m_timer = 0;
    137 }
    138 
    139 bool HeapTimer::timerEvent(void* info)
    140 {
    141     HeapTimer* agent = static_cast<HeapTimer*>(info);
    142    
    143     JSLockHolder locker(agent->m_vm);
    144     agent->doWork();
    145     agent->m_timer = 0;
    146    
    147     return ECORE_CALLBACK_CANCEL;
    148 }
    149 
    150 void HeapTimer::scheduleTimer(double intervalInSeconds)
    151 {
    152     if (ecore_timer_freeze_get(m_timer))
    153         ecore_timer_thaw(m_timer);
    154 
    155     double targetTime = currentTime() + intervalInSeconds;
    156     ecore_timer_interval_set(m_timer, targetTime);
    157     m_isScheduled = true;
    158 }
    159 
    160 void HeapTimer::cancelTimer()
    161 {
    162     ecore_timer_freeze(m_timer);
    163     m_isScheduled = false;
    164 }
    165109#elif USE(GLIB)
    166110
  • trunk/Source/JavaScriptCore/heap/HeapTimer.h

    r208306 r212464  
    3636#endif
    3737
    38 #if USE(GLIB) && !PLATFORM(EFL)
     38#if USE(GLIB)
    3939#include <wtf/glib/GRefPtr.h>
    4040#endif
     
    7777
    7878    Lock m_shutdownMutex;
    79 #elif PLATFORM(EFL)
    80     static bool timerEvent(void*);
    81     Ecore_Timer* add(double delay, void* agent);
    82     void stop();
    83     Ecore_Timer* m_timer;
    8479#elif USE(GLIB)
    8580    void timerDidFire();
  • trunk/Source/JavaScriptCore/inspector/EventLoop.cpp

    r200209 r212464  
    2929#if OS(WINDOWS)
    3030#include <windows.h>
    31 #elif PLATFORM(EFL)
    32 #include <Ecore.h>
    3331#elif PLATFORM(GTK)
    3432#include <glib.h>
     
    6866    CFTimeInterval timeInterval = 0.05;
    6967    CFRunLoopRunInMode(remoteInspectorRunLoopMode(), timeInterval, true);
    70 #elif PLATFORM(EFL)
    71     ecore_main_loop_iterate();
    7268#elif PLATFORM(GTK)
    7369    g_main_context_iteration(NULL, FALSE);
  • trunk/Source/JavaScriptCore/jsc.cpp

    r212438 r212464  
    123123#endif
    124124
    125 #if PLATFORM(EFL)
    126 #include <Ecore.h>
    127 #endif
    128 
    129125#if !defined(PATH_MAX)
    130126#define PATH_MAX 4096
     
    32333229#endif
    32343230
    3235 #if PLATFORM(EFL)
    3236     ecore_init();
    3237 #endif
    3238 
    32393231#if PLATFORM(GTK)
    32403232    if (!setlocale(LC_ALL, ""))
     
    32583250    EXCEPT(res = 3)
    32593251    finalizeStatsAtEndOfTesting();
    3260 
    3261 #if PLATFORM(EFL)
    3262     ecore_shutdown();
    3263 #endif
    32643252
    32653253    jscExit(res);
  • trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp

    r173949 r212464  
    4949#endif
    5050
    51 #if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     51#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    5252// Helper function to start & stop the timer.
    5353// Presently we're using the wall-clock timer, since this seems to give the best results.
     
    6767#endif
    6868
    69 #if OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)
     69#if OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)
    7070static void profilingTimer(int, siginfo_t*, void* uap)
    7171{
     
    142142        return;
    143143
    144 #if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     144#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    145145    // Regsiter a signal handler & itimer.
    146146    struct sigaction action;
     
    166166        return;
    167167
    168 #if (OS(DARWIN) && !PLATFORM(EFL) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
     168#if (OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64)) || (OS(LINUX) && CPU(X86))
    169169    // Stop profiling
    170170    setProfileTimer(0);
Note: See TracChangeset for help on using the changeset viewer.