Bug 1114064. Support AliasNone DOM methods in ion compilation. r=efaust

This commit is contained in:
Boris Zbarsky 2015-01-02 17:20:36 -05:00
Родитель c9638d4bc8
Коммит c364a37ecb
2 изменённых файлов: 12 добавлений и 9 удалений

Просмотреть файл

@ -1013,11 +1013,10 @@ MCallDOMNative::getAliasSet() const
{
const JSJitInfo *jitInfo = getJitInfo();
MOZ_ASSERT(jitInfo->aliasSet() != JSJitInfo::AliasNone);
// If we don't know anything about the types of our arguments, we have to
// assume that type-coercions can have side-effects, so we need to alias
// everything.
if (jitInfo->aliasSet() != JSJitInfo::AliasDOMSets || !jitInfo->isTypedMethodJitInfo())
if (jitInfo->aliasSet() == JSJitInfo::AliasEverything || !jitInfo->isTypedMethodJitInfo())
return AliasSet::Store(AliasSet::Any);
uint32_t argIndex = 0;
@ -1048,8 +1047,12 @@ MCallDOMNative::getAliasSet() const
}
}
// We checked all the args, and they check out. So we only
// alias DOM mutations.
// We checked all the args, and they check out. So we only alias DOM
// mutations or alias nothing, depending on the alias set in the jitinfo.
if (jitInfo->aliasSet() == JSJitInfo::AliasNone)
return AliasSet::None();
MOZ_ASSERT(jitInfo->aliasSet() == JSJitInfo::AliasDOMSets);
return AliasSet::Load(AliasSet::DOMProperty);
}

Просмотреть файл

@ -3366,11 +3366,11 @@ class MCallDOMNative : public MCall
: MCall(target, numActualArgs, false)
{
// If our jitinfo is not marked movable, that means that our C++
// implementation is fallible or that we have no hope of ever doing the
// sort of argument analysis that would allow us to detemine that we're
// side-effect-free. In the latter case we wouldn't get DCEd no matter
// what, but for the former case we have to explicitly say that we can't
// be DCEd.
// implementation is fallible or that it never wants to be eliminated or
// coalesced or that we have no hope of ever doing the sort of argument
// analysis that would allow us to detemine that we're side-effect-free.
// In the latter case we wouldn't get DCEd no matter what, but for the
// former two cases we have to explicitly say that we can't be DCEd.
if (!getJitInfo()->isMovable)
setGuard();
}