зеркало из https://github.com/mozilla/gecko-dev.git
Bug 868684 - OdinMonkey: sequential compilation allocates LIR in the tempLifoAlloc (r=sstangl)
This commit is contained in:
Родитель
4dfca937ff
Коммит
9c1c4904de
|
@ -1059,7 +1059,6 @@ class ModuleCompiler
|
|||
typedef Vector<AsmJSGlobalAccess> GlobalAccessVector;
|
||||
|
||||
JSContext * cx_;
|
||||
IonContext ictx_;
|
||||
MacroAssembler masm_;
|
||||
|
||||
ScopedJSDeletePtr<AsmJSModule> module_;
|
||||
|
@ -1091,7 +1090,6 @@ class ModuleCompiler
|
|||
public:
|
||||
ModuleCompiler(JSContext *cx, TokenStream &ts)
|
||||
: cx_(cx),
|
||||
ictx_(cx->runtime),
|
||||
masm_(cx),
|
||||
moduleFunctionName_(NULL),
|
||||
globals_(cx),
|
||||
|
@ -4521,6 +4519,8 @@ CheckFunctionBodiesSequential(ModuleCompiler &m)
|
|||
|
||||
IonSpewNewFunction(&mirGen->graph(), NullPtr());
|
||||
|
||||
IonContext icx(m.cx()->compartment, &mirGen->temp());
|
||||
|
||||
if (!OptimizeMIR(mirGen))
|
||||
return m.fail("Internal compiler failure (probably out of memory)", func.fn());
|
||||
|
||||
|
|
|
@ -103,6 +103,12 @@ ion::GetIonContext()
|
|||
return CurrentIonContext();
|
||||
}
|
||||
|
||||
IonContext *
|
||||
ion::MaybeGetIonContext()
|
||||
{
|
||||
return CurrentIonContext();
|
||||
}
|
||||
|
||||
IonContext::IonContext(JSContext *cx, TempAllocator *temp)
|
||||
: runtime(cx->runtime),
|
||||
cx(cx),
|
||||
|
|
|
@ -272,6 +272,7 @@ bool InitializeIon();
|
|||
|
||||
// Get and set the current Ion context.
|
||||
IonContext *GetIonContext();
|
||||
IonContext *MaybeGetIonContext();
|
||||
|
||||
bool SetIonContext(IonContext *ctx);
|
||||
|
||||
|
|
|
@ -261,7 +261,7 @@ class Label : public LabelBase
|
|||
// Note: the condition is a hack to silence this assert when OOM testing,
|
||||
// see bug 756614.
|
||||
if (!js_IonOptions.parallelCompilation)
|
||||
JS_ASSERT_IF(!GetIonContext()->runtime->hadOutOfMemory, !used());
|
||||
JS_ASSERT_IF(MaybeGetIonContext() && !GetIonContext()->runtime->hadOutOfMemory, !used());
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче