mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 1028529 - ensure IonSpewEndFunction is called once for each call to IonSpewNewFunction. r=nbp
This commit is contained in:
parent
be2f9aa5ca
commit
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);
|
||||
|
Loading…
Reference in New Issue
Block a user