mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 941028 - IonMonkey: Don't inline into big functions, r=jandem
This commit is contained in:
parent
2ccb902003
commit
62f5679921
@ -204,6 +204,12 @@ struct IonOptions
|
||||
// Default: 1
|
||||
uint32_t usesBeforeCompilePar;
|
||||
|
||||
// The maximum bytecode length the caller may have,
|
||||
// before we stop inlining any functions in that caller.
|
||||
//
|
||||
// Default: 10000
|
||||
uint32_t inliningMaxCallerBytecodeLength;
|
||||
|
||||
void setEagerCompilation() {
|
||||
eagerCompilation = true;
|
||||
usesBeforeCompile = 0;
|
||||
@ -242,7 +248,8 @@ struct IonOptions
|
||||
inlineMaxTotalBytecodeLength(1000),
|
||||
inlineUseCountRatio(128),
|
||||
eagerCompilation(false),
|
||||
usesBeforeCompilePar(1)
|
||||
usesBeforeCompilePar(1),
|
||||
inliningMaxCallerBytecodeLength(10000)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -4036,6 +4036,13 @@ IonBuilder::makeInliningDecision(JSFunction *target, CallInfo &callInfo)
|
||||
targetScript->filename(), targetScript->lineno);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Caller must not be excessively large.
|
||||
if (script()->length >= js_IonOptions.inliningMaxCallerBytecodeLength) {
|
||||
IonSpew(IonSpew_Inlining, "%s:%d - Vetoed: caller excessively large.",
|
||||
targetScript->filename(), targetScript->lineno);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Callee must not be excessively large.
|
||||
|
Loading…
Reference in New Issue
Block a user