Changeset 212464 in webkit
- Timestamp:
- Feb 16, 2017 2:28:54 PM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r212462 r212464 1 2017-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 1 26 2017-02-15 Brian Burg <bburg@apple.com> 2 27 -
trunk/Source/JavaScriptCore/heap/GCActivityCallback.cpp
r211631 r212464 35 35 #include "VM.h" 36 36 37 #if PLATFORM(EFL) 38 #include <wtf/MainThread.h> 39 #elif USE(GLIB) 37 #if USE(GLIB) 40 38 #include <glib.h> 41 39 #endif … … 52 50 GCActivityCallback::GCActivityCallback(Heap* heap) 53 51 : GCActivityCallback(heap->vm()) 54 {55 }56 #elif PLATFORM(EFL)57 GCActivityCallback::GCActivityCallback(Heap* heap)58 : GCActivityCallback(heap->vm(), WTF::isMainThread())59 52 { 60 53 } … … 98 91 CFRunLoopTimerSetNextFireDate(m_timer.get(), CFAbsoluteTimeGetCurrent() + s_decade); 99 92 } 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 }118 93 #elif USE(GLIB) 119 94 void GCActivityCallback::scheduleTimer(double newDelay) … … 150 125 void GCActivityCallback::didAllocate(size_t bytes) 151 126 { 152 #if PLATFORM(EFL)153 if (!isEnabled())154 return;155 156 ASSERT(WTF::isMainThread());157 #endif158 159 127 // The first byte allocated in an allocation cycle will report 0 bytes to didAllocate. 160 128 // We pretend it's one byte so that we don't ignore this allocation entirely. -
trunk/Source/JavaScriptCore/heap/GCActivityCallback.h
r211631 r212464 76 76 { 77 77 } 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 }86 78 #elif USE(GLIB) 87 79 GCActivityCallback(VM* vm) -
trunk/Source/JavaScriptCore/heap/HeapTimer.cpp
r208306 r212464 35 35 #include <wtf/Threading.h> 36 36 37 #if PLATFORM(EFL) 38 #include <Ecore.h> 39 #elif USE(GLIB) 37 #if USE(GLIB) 40 38 #include <glib.h> 41 39 #endif … … 109 107 } 110 108 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 }165 109 #elif USE(GLIB) 166 110 -
trunk/Source/JavaScriptCore/heap/HeapTimer.h
r208306 r212464 36 36 #endif 37 37 38 #if USE(GLIB) && !PLATFORM(EFL)38 #if USE(GLIB) 39 39 #include <wtf/glib/GRefPtr.h> 40 40 #endif … … 77 77 78 78 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;84 79 #elif USE(GLIB) 85 80 void timerDidFire(); -
trunk/Source/JavaScriptCore/inspector/EventLoop.cpp
r200209 r212464 29 29 #if OS(WINDOWS) 30 30 #include <windows.h> 31 #elif PLATFORM(EFL)32 #include <Ecore.h>33 31 #elif PLATFORM(GTK) 34 32 #include <glib.h> … … 68 66 CFTimeInterval timeInterval = 0.05; 69 67 CFRunLoopRunInMode(remoteInspectorRunLoopMode(), timeInterval, true); 70 #elif PLATFORM(EFL)71 ecore_main_loop_iterate();72 68 #elif PLATFORM(GTK) 73 69 g_main_context_iteration(NULL, FALSE); -
trunk/Source/JavaScriptCore/jsc.cpp
r212438 r212464 123 123 #endif 124 124 125 #if PLATFORM(EFL)126 #include <Ecore.h>127 #endif128 129 125 #if !defined(PATH_MAX) 130 126 #define PATH_MAX 4096 … … 3233 3229 #endif 3234 3230 3235 #if PLATFORM(EFL)3236 ecore_init();3237 #endif3238 3239 3231 #if PLATFORM(GTK) 3240 3232 if (!setlocale(LC_ALL, "")) … … 3258 3250 EXCEPT(res = 3) 3259 3251 finalizeStatsAtEndOfTesting(); 3260 3261 #if PLATFORM(EFL)3262 ecore_shutdown();3263 #endif3264 3252 3265 3253 jscExit(res); -
trunk/Source/JavaScriptCore/tools/CodeProfiling.cpp
r173949 r212464 49 49 #endif 50 50 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)) 52 52 // Helper function to start & stop the timer. 53 53 // Presently we're using the wall-clock timer, since this seems to give the best results. … … 67 67 #endif 68 68 69 #if OS(DARWIN) && !PLATFORM( EFL) && !PLATFORM(GTK) && CPU(X86_64)69 #if OS(DARWIN) && !PLATFORM(GTK) && CPU(X86_64) 70 70 static void profilingTimer(int, siginfo_t*, void* uap) 71 71 { … … 142 142 return; 143 143 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)) 145 145 // Regsiter a signal handler & itimer. 146 146 struct sigaction action; … … 166 166 return; 167 167 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)) 169 169 // Stop profiling 170 170 setProfileTimer(0);
Note: See TracChangeset
for help on using the changeset viewer.