Bug 1199143 - Inline heavyweight functions. r=shu

This commit is contained in:
Jan de Mooij 2015-09-02 09:44:17 +02:00
parent 3324bb898f
commit 3ef7347013
3 changed files with 4 additions and 9 deletions

View File

@ -150,7 +150,6 @@ namespace JS {
_(CantInlineClassConstructor) \ _(CantInlineClassConstructor) \
_(CantInlineDisabledIon) \ _(CantInlineDisabledIon) \
_(CantInlineTooManyArgs) \ _(CantInlineTooManyArgs) \
_(CantInlineHeavyweight) \
_(CantInlineNeedsArgsObj) \ _(CantInlineNeedsArgsObj) \
_(CantInlineDebuggee) \ _(CantInlineDebuggee) \
_(CantInlineUnknownProps) \ _(CantInlineUnknownProps) \

View File

@ -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);
}); });

View File

@ -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");