зеркало из https://github.com/mozilla/gecko-dev.git
Bug 981553 - Remove JitCompartment::rt. r=nbp
--HG-- extra : rebase_source : f67e0f35f7f050baa3a9d2520bd22f0760d4b36b
This commit is contained in:
Родитель
9b4317d55f
Коммит
5bfb704860
|
@ -455,9 +455,8 @@ jit::RequestInterruptForIonCode(JSRuntime *rt, JSRuntime::InterruptMode mode)
|
|||
}
|
||||
}
|
||||
|
||||
JitCompartment::JitCompartment(JitRuntime *rt)
|
||||
: rt(rt),
|
||||
stubCodes_(nullptr),
|
||||
JitCompartment::JitCompartment()
|
||||
: stubCodes_(nullptr),
|
||||
baselineCallReturnAddr_(nullptr),
|
||||
baselineGetPropReturnAddr_(nullptr),
|
||||
baselineSetPropReturnAddr_(nullptr),
|
||||
|
@ -562,7 +561,7 @@ JitCompartment::mark(JSTracer *trc, JSCompartment *compartment)
|
|||
FinishAllOffThreadCompilations(compartment);
|
||||
|
||||
// Free temporary OSR buffer.
|
||||
rt->freeOsrTempData();
|
||||
trc->runtime->jitRuntime()->freeOsrTempData();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -78,7 +78,7 @@ class Linker
|
|||
|
||||
template <AllowGC allowGC>
|
||||
JitCode *newCode(JSContext *cx, JSC::CodeKind kind) {
|
||||
return newCode<allowGC>(cx, cx->compartment()->jitCompartment()->execAlloc(), kind);
|
||||
return newCode<allowGC>(cx, cx->runtime()->jitRuntime()->execAlloc(), kind);
|
||||
}
|
||||
|
||||
JitCode *newCodeForIonScript(JSContext *cx) {
|
||||
|
|
|
@ -245,6 +245,10 @@ class JitRuntime
|
|||
flusher_ = fl;
|
||||
}
|
||||
|
||||
JSC::ExecutableAllocator *execAlloc() const {
|
||||
return execAlloc_;
|
||||
}
|
||||
|
||||
JSC::ExecutableAllocator *getIonAlloc(JSContext *cx) {
|
||||
JS_ASSERT(cx->runtime()->currentThreadOwnsInterruptLock());
|
||||
return ionAlloc_ ? ionAlloc_ : createIonAlloc(cx);
|
||||
|
@ -336,9 +340,6 @@ class JitCompartment
|
|||
{
|
||||
friend class JitActivation;
|
||||
|
||||
// Ion state for the compartment's runtime.
|
||||
JitRuntime *rt;
|
||||
|
||||
// Map ICStub keys to ICStub shared code objects.
|
||||
typedef WeakValueCache<uint32_t, ReadBarriered<JitCode> > ICStubCodeMap;
|
||||
ICStubCodeMap *stubCodes_;
|
||||
|
@ -406,7 +407,7 @@ class JitCompartment
|
|||
JSC::ExecutableAllocator *createIonAlloc();
|
||||
|
||||
public:
|
||||
JitCompartment(JitRuntime *rt);
|
||||
JitCompartment();
|
||||
~JitCompartment();
|
||||
|
||||
bool initialize(JSContext *cx);
|
||||
|
@ -417,10 +418,6 @@ class JitCompartment
|
|||
void mark(JSTracer *trc, JSCompartment *compartment);
|
||||
void sweep(FreeOp *fop);
|
||||
|
||||
JSC::ExecutableAllocator *execAlloc() {
|
||||
return rt->execAlloc_;
|
||||
}
|
||||
|
||||
JitCode *stringConcatStub(ExecutionMode mode) const {
|
||||
switch (mode) {
|
||||
case SequentialExecution: return stringConcatStub_;
|
||||
|
|
|
@ -164,12 +164,11 @@ JSCompartment::ensureJitCompartmentExists(JSContext *cx)
|
|||
if (jitCompartment_)
|
||||
return true;
|
||||
|
||||
JitRuntime *jitRuntime = cx->runtime()->getJitRuntime(cx);
|
||||
if (!jitRuntime)
|
||||
if (!cx->runtime()->getJitRuntime(cx))
|
||||
return false;
|
||||
|
||||
/* Set the compartment early, so linking works. */
|
||||
jitCompartment_ = cx->new_<JitCompartment>(jitRuntime);
|
||||
jitCompartment_ = cx->new_<JitCompartment>();
|
||||
|
||||
if (!jitCompartment_)
|
||||
return false;
|
||||
|
|
Загрузка…
Ссылка в новой задаче