Bug 1527148 part 1 - Fix an Ion polymorphic inlining issue. r=bhackett

Differential Revision: https://phabricator.services.mozilla.com/D21540

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-03-01 22:17:41 +00:00
parent 31fb2275a2
commit 4d43e22cec

View File

@ -4468,6 +4468,16 @@ AbortReasonOr<Ok> IonBuilder::selectInliningTargets(
inlineable = false;
}
// Only use a group guard and inline the target if we will recompile when
// the target function gets a new group.
if (inlineable && targets[i].group) {
ObjectGroup* group = targets[i].group;
TypeSet::ObjectKey* key = TypeSet::ObjectKey::get(group);
if (!key->hasStableClassAndProto(constraints())) {
inlineable = false;
}
}
choiceSet.infallibleAppend(inlineable);
if (inlineable) {
*numInlineable += 1;