зеркало из https://github.com/mozilla/gecko-dev.git
Completely disable IonMonkey when MOZ_APP_NAME=b2g (bug 790092, r=sstangl).
--HG-- extra : rebase_source : 35dac954dbacacbae36848a47492f2ec25273a65
This commit is contained in:
Родитель
80a55112a1
Коммит
c6b741cb1a
|
@ -2236,6 +2236,11 @@ else
|
|||
ENABLE_ION=
|
||||
fi
|
||||
|
||||
# Disable IonMonkey for B2G, for now.
|
||||
if test "$MOZ_APP_NAME" = b2g; then
|
||||
ENABLE_ION=
|
||||
fi
|
||||
|
||||
if test "$ENABLE_MONOIC"; then
|
||||
AC_DEFINE(JS_MONOIC)
|
||||
fi
|
||||
|
|
|
@ -958,9 +958,11 @@ JSRuntime::init(uint32_t maxbytes)
|
|||
return false;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
# ifdef JS_ION
|
||||
workerThreadState = this->new_<WorkerThreadState>();
|
||||
if (!workerThreadState || !workerThreadState->init(this))
|
||||
return false;
|
||||
# endif
|
||||
|
||||
if (!sourceCompressorThread.init())
|
||||
return false;
|
||||
|
@ -994,7 +996,9 @@ JSRuntime::~JSRuntime()
|
|||
FreeScriptFilenames(this);
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
# ifdef JS_ION
|
||||
js_delete(workerThreadState);
|
||||
# endif
|
||||
sourceCompressorThread.finish();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -814,7 +814,9 @@ struct JSRuntime : js::RuntimeFriendFields
|
|||
js::GCHelperThread gcHelperThread;
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
# ifdef JS_ION
|
||||
js::WorkerThreadState *workerThreadState;
|
||||
# endif
|
||||
|
||||
js::SourceCompressorThread sourceCompressorThread;
|
||||
#endif
|
||||
|
|
|
@ -10,13 +10,9 @@
|
|||
# include "ion/IonBuilder.h"
|
||||
#endif
|
||||
|
||||
#if defined(JS_ION) && defined(JS_THREADSAFE)
|
||||
# define ENABLE_WORKERS
|
||||
#endif
|
||||
|
||||
using namespace js;
|
||||
|
||||
#ifdef ENABLE_WORKERS
|
||||
#ifdef JS_PARALLEL_COMPILATION
|
||||
|
||||
bool
|
||||
js::StartOffThreadIonCompile(JSContext *cx, ion::IonBuilder *builder)
|
||||
|
@ -295,7 +291,7 @@ WorkerThread::threadLoop()
|
|||
}
|
||||
}
|
||||
|
||||
#else /* ENABLE_WORKERS */
|
||||
#else /* JS_PARALLEL_COMPILATION */
|
||||
|
||||
bool
|
||||
js::StartOffThreadIonCompile(JSContext *cx, ion::IonBuilder *builder)
|
||||
|
@ -309,4 +305,4 @@ js::CancelOffThreadIonCompile(JSCompartment *compartment, JSScript *script)
|
|||
{
|
||||
}
|
||||
|
||||
#endif /* ENABLE_WORKERS */
|
||||
#endif /* JS_PARALLEL_COMPILATION */
|
||||
|
|
|
@ -22,7 +22,8 @@ namespace ion {
|
|||
class IonBuilder;
|
||||
}
|
||||
|
||||
#ifdef JS_THREADSAFE
|
||||
#if defined(JS_THREADSAFE) && defined(JS_ION)
|
||||
# define JS_PARALLEL_COMPILATION
|
||||
|
||||
struct WorkerThread;
|
||||
|
||||
|
@ -49,9 +50,9 @@ struct WorkerThreadState
|
|||
void lock();
|
||||
void unlock();
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef DEBUG
|
||||
bool isLocked();
|
||||
#endif
|
||||
# endif
|
||||
|
||||
void wait(CondVar which, uint32_t timeoutMillis = 0);
|
||||
void notify(CondVar which);
|
||||
|
@ -65,9 +66,9 @@ struct WorkerThreadState
|
|||
*/
|
||||
PRLock *workerLock;
|
||||
|
||||
#ifdef DEBUG
|
||||
# ifdef DEBUG
|
||||
PRThread *lockOwner;
|
||||
#endif
|
||||
# endif
|
||||
|
||||
/* Condvar to notify the main thread that work has been completed. */
|
||||
PRCondVar *mainWakeup;
|
||||
|
@ -94,7 +95,7 @@ struct WorkerThread
|
|||
void threadLoop();
|
||||
};
|
||||
|
||||
#endif /* JS_THREADSAFE */
|
||||
#endif /* JS_THREADSAFE && JS_ION */
|
||||
|
||||
/* Methods for interacting with worker threads. */
|
||||
|
||||
|
@ -120,7 +121,7 @@ class AutoLockWorkerThreadState
|
|||
AutoLockWorkerThreadState(JSRuntime *rt JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: rt(rt)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
#ifdef JS_PARALLEL_COMPILATION
|
||||
rt->workerThreadState->lock();
|
||||
#endif
|
||||
JS_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
|
@ -128,7 +129,7 @@ class AutoLockWorkerThreadState
|
|||
|
||||
~AutoLockWorkerThreadState()
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
#ifdef JS_PARALLEL_COMPILATION
|
||||
rt->workerThreadState->unlock();
|
||||
#endif
|
||||
}
|
||||
|
@ -144,7 +145,7 @@ class AutoUnlockWorkerThreadState
|
|||
AutoUnlockWorkerThreadState(JSRuntime *rt JS_GUARD_OBJECT_NOTIFIER_PARAM)
|
||||
: rt(rt)
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
#ifdef JS_PARALLEL_COMPILATION
|
||||
rt->workerThreadState->unlock();
|
||||
#endif
|
||||
JS_GUARD_OBJECT_NOTIFIER_INIT;
|
||||
|
@ -152,7 +153,7 @@ class AutoUnlockWorkerThreadState
|
|||
|
||||
~AutoUnlockWorkerThreadState()
|
||||
{
|
||||
#ifdef JS_THREADSAFE
|
||||
#ifdef JS_PARALLEL_COMPILATION
|
||||
rt->workerThreadState->lock();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -4006,7 +4006,7 @@ mjit::Compiler::interruptCheckHelper()
|
|||
stubcc.rejoin(Changes(0));
|
||||
}
|
||||
|
||||
static bool
|
||||
static inline bool
|
||||
MaybeIonCompileable(JSContext *cx, JSScript *script, bool *recompileCheckForIon)
|
||||
{
|
||||
#ifdef JS_ION
|
||||
|
|
Загрузка…
Ссылка в новой задаче