mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Bug 1199143 - Inline heavyweight functions. r=shu
This commit is contained in:
parent
3324bb898f
commit
3ef7347013
@ -150,7 +150,6 @@ namespace JS {
|
|||||||
_(CantInlineClassConstructor) \
|
_(CantInlineClassConstructor) \
|
||||||
_(CantInlineDisabledIon) \
|
_(CantInlineDisabledIon) \
|
||||||
_(CantInlineTooManyArgs) \
|
_(CantInlineTooManyArgs) \
|
||||||
_(CantInlineHeavyweight) \
|
|
||||||
_(CantInlineNeedsArgsObj) \
|
_(CantInlineNeedsArgsObj) \
|
||||||
_(CantInlineDebuggee) \
|
_(CantInlineDebuggee) \
|
||||||
_(CantInlineUnknownProps) \
|
_(CantInlineUnknownProps) \
|
||||||
|
@ -25,13 +25,14 @@ withJitOptions(Opts_Ion2NoOffthreadCompilation, function () {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
g.eval("" + function f(d, x) { "use strict"; g(d, x); });
|
g.eval("" + function f(d, x) {
|
||||||
|
"use strict";
|
||||||
|
eval("g(d, x)"); // `eval` to avoid inlining g.
|
||||||
|
});
|
||||||
|
|
||||||
g.eval("" + function g(d, x) {
|
g.eval("" + function g(d, x) {
|
||||||
"use strict";
|
"use strict";
|
||||||
for (var i = 0; i < 200; i++);
|
for (var i = 0; i < 200; i++);
|
||||||
// Hack to prevent inlining.
|
|
||||||
function inner() { i = 42; };
|
|
||||||
toggle(d);
|
toggle(d);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -524,11 +524,6 @@ IonBuilder::canInlineTarget(JSFunction* target, CallInfo& callInfo)
|
|||||||
return DontInline(inlineScript, "Common inlining path");
|
return DontInline(inlineScript, "Common inlining path");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (target->isHeavyweight()) {
|
|
||||||
trackOptimizationOutcome(TrackedOutcome::CantInlineHeavyweight);
|
|
||||||
return DontInline(inlineScript, "Heavyweight function");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inlineScript->uninlineable()) {
|
if (inlineScript->uninlineable()) {
|
||||||
trackOptimizationOutcome(TrackedOutcome::CantInlineGeneric);
|
trackOptimizationOutcome(TrackedOutcome::CantInlineGeneric);
|
||||||
return DontInline(inlineScript, "Uninlineable script");
|
return DontInline(inlineScript, "Uninlineable script");
|
||||||
|
Loading…
Reference in New Issue
Block a user