зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1028529 - ensure IonSpewEndFunction is called once for each call to IonSpewNewFunction. r=nbp
This commit is contained in:
Родитель
be2f9aa5ca
Коммит
647d7f6f7a
|
@ -1905,7 +1905,9 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
builderScript->ionScript()->setRecompiling();
|
||||
}
|
||||
|
||||
IonSpewNewFunction(graph, builderScript);
|
||||
#ifdef DEBUG
|
||||
IonSpewFunction ionSpewFunction(graph, builderScript);
|
||||
#endif
|
||||
|
||||
bool succeeded = builder->build();
|
||||
builder->clearForBackEnd();
|
||||
|
@ -1941,8 +1943,6 @@ IonCompile(JSContext *cx, JSScript *script,
|
|||
|
||||
bool success = codegen->link(cx, builder->constraints());
|
||||
|
||||
IonSpewEndFunction();
|
||||
|
||||
return success ? AbortReason_NoAbort : AbortReason_Disable;
|
||||
}
|
||||
|
||||
|
|
|
@ -425,5 +425,15 @@ jit::DisableChannel(IonSpewChannel channel)
|
|||
LoggingBits &= ~(1 << uint32_t(channel));
|
||||
}
|
||||
|
||||
IonSpewFunction::IonSpewFunction(MIRGraph *graph, JS::HandleScript function)
|
||||
{
|
||||
IonSpewNewFunction(graph, function);
|
||||
}
|
||||
|
||||
IonSpewFunction::~IonSpewFunction()
|
||||
{
|
||||
IonSpewEndFunction();
|
||||
}
|
||||
|
||||
#endif /* DEBUG */
|
||||
|
||||
|
|
|
@ -115,6 +115,13 @@ class IonSpewer
|
|||
void endFunction();
|
||||
};
|
||||
|
||||
class IonSpewFunction
|
||||
{
|
||||
public:
|
||||
IonSpewFunction(MIRGraph *graph, JS::HandleScript function);
|
||||
~IonSpewFunction();
|
||||
};
|
||||
|
||||
void IonSpewNewFunction(MIRGraph *graph, JS::HandleScript function);
|
||||
void IonSpewPass(const char *pass);
|
||||
void IonSpewPass(const char *pass, LinearScanAllocator *ra);
|
||||
|
|
Загрузка…
Ссылка в новой задаче