Bug 1668532 part 2 - Assert resumeAfter is only used with non-movable instructions. r=iain

This caught some isEffectful instructions that were marked isMovable. That doesn't
really make sense, but this also doesn't fix any actual issues because optimizations
check both.

Depends on D92579

Differential Revision: https://phabricator.services.mozilla.com/D92580
This commit is contained in:
Jan de Mooij 2020-10-08 00:47:56 +00:00
Родитель c40ba66de1
Коммит aa914154fa
2 изменённых файлов: 1 добавлений и 7 удалений

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

@ -7023,7 +7023,6 @@ class MRegExpMatcher : public MTernaryInstruction,
MRegExpMatcher(MDefinition* regexp, MDefinition* string,
MDefinition* lastIndex)
: MTernaryInstruction(classOpcode, regexp, string, lastIndex) {
setMovable();
// May be object or null.
setResultType(MIRType::Value);
}
@ -7048,7 +7047,6 @@ class MRegExpSearcher : public MTernaryInstruction,
MRegExpSearcher(MDefinition* regexp, MDefinition* string,
MDefinition* lastIndex)
: MTernaryInstruction(classOpcode, regexp, string, lastIndex) {
setMovable();
setResultType(MIRType::Int32);
}
@ -7072,7 +7070,6 @@ class MRegExpTester : public MTernaryInstruction,
MRegExpTester(MDefinition* regexp, MDefinition* string,
MDefinition* lastIndex)
: MTernaryInstruction(classOpcode, regexp, string, lastIndex) {
setMovable();
setResultType(MIRType::Int32);
}
@ -8740,8 +8737,6 @@ class MStoreUnboxedScalar : public MTernaryInstruction,
requiresBarrier_(requiresBarrier == DoesRequireMemoryBarrier) {
if (requiresBarrier_) {
setGuard(); // Not removable or movable
} else {
setMovable();
}
MOZ_ASSERT(elements->type() == MIRType::Elements);
MOZ_ASSERT(index->type() == MIRType::Int32);
@ -8776,7 +8771,6 @@ class MStoreDataViewElement : public MQuaternaryInstruction,
: MQuaternaryInstruction(classOpcode, elements, index, value,
littleEndian),
StoreUnboxedScalarBase(storageType) {
setMovable();
MOZ_ASSERT(elements->type() == MIRType::Elements);
MOZ_ASSERT(index->type() == MIRType::Int32);
MOZ_ASSERT(storageType >= 0 && storageType < Scalar::MaxTypedArrayViewType);
@ -8808,7 +8802,6 @@ class MStoreTypedArrayElementHole : public MQuaternaryInstruction,
Scalar::Type arrayType)
: MQuaternaryInstruction(classOpcode, elements, length, index, value),
StoreUnboxedScalarBase(arrayType) {
setMovable();
MOZ_ASSERT(elements->type() == MIRType::Elements);
MOZ_ASSERT(length->type() == MIRType::Int32);
MOZ_ASSERT(index->type() == MIRType::Int32);

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

@ -26,6 +26,7 @@ bool WarpBuilderShared::resumeAfter(MInstruction* ins, BytecodeLocation loc) {
// exception is MInt64ToBigInt, it's used to convert the result of a call into
// Wasm code so we attach the resume point to that instead of to the call.
MOZ_ASSERT(ins->isEffectful() || ins->isInt64ToBigInt());
MOZ_ASSERT(!ins->isMovable());
MResumePoint* resumePoint = MResumePoint::New(
alloc(), ins->block(), loc.toRawBytecode(), MResumePoint::ResumeAfter);