Bug 1607443 - Fix some alias sets. r=tcampbell, a=lizzard
Differential Revision:
https://phabricator.services.mozilla.com/D58956
--- a/js/src/jit/AliasAnalysis.cpp
+++ b/js/src/jit/AliasAnalysis.cpp
@@ -115,18 +115,16 @@ static inline const MDefinition* GetObje
case MDefinition::Opcode::LoadUnboxedString:
case MDefinition::Opcode::StoreElement:
case MDefinition::Opcode::StoreUnboxedObjectOrNull:
case MDefinition::Opcode::StoreUnboxedString:
case MDefinition::Opcode::StoreUnboxedScalar:
case MDefinition::Opcode::SetInitializedLength:
case MDefinition::Opcode::ArrayLength:
case MDefinition::Opcode::SetArrayLength:
- case MDefinition::Opcode::StoreElementHole:
- case MDefinition::Opcode::FallibleStoreElement:
case MDefinition::Opcode::TypedObjectDescr:
case MDefinition::Opcode::Slots:
case MDefinition::Opcode::Elements:
case MDefinition::Opcode::MaybeCopyElementsForWrite:
case MDefinition::Opcode::MaybeToDoubleElement:
case MDefinition::Opcode::TypedArrayLength:
case MDefinition::Opcode::TypedArrayByteOffset:
case MDefinition::Opcode::SetTypedObjectOffset:
@@ -177,16 +175,18 @@ static inline const MDefinition* GetObje
case MDefinition::Opcode::WasmAtomicExchangeHeap:
case MDefinition::Opcode::WasmLoadGlobalVar:
case MDefinition::Opcode::WasmLoadGlobalCell:
case MDefinition::Opcode::WasmStoreGlobalVar:
case MDefinition::Opcode::WasmStoreGlobalCell:
case MDefinition::Opcode::WasmStoreRef:
case MDefinition::Opcode::ArrayJoin:
case MDefinition::Opcode::ArraySlice:
+ case MDefinition::Opcode::StoreElementHole:
+ case MDefinition::Opcode::FallibleStoreElement:
return nullptr;
default:
#ifdef DEBUG
// Crash when the default aliasSet is overriden, but when not added in the
// list above.
if (!ins->getAliasSet().isStore() ||
ins->getAliasSet().flags() != AliasSet::Flag::Any) {
MOZ_CRASH(
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -7787,22 +7787,16 @@ class MStoreElementHole
MOZ_ASSERT(index->type() == MIRType::Int32);
}
public:
INSTRUCTION_HEADER(StoreElementHole)
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
- AliasSet getAliasSet() const override {
- // StoreElementHole can update the initialized length, the array length
- // or reallocate obj->elements.
- return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
- }
-
ALLOW_CLONE(MStoreElementHole)
};
// Try to store a value to a dense array slots vector. May fail due to the
// object being non-extensible/sealed/frozen. Cannot be used on an object that
// has extra indexed properties.
class MFallibleStoreElement
: public MQuaternaryInstruction,
@@ -7819,19 +7813,16 @@ class MFallibleStoreElement
MOZ_ASSERT(index->type() == MIRType::Int32);
}
public:
INSTRUCTION_HEADER(FallibleStoreElement)
TRIVIAL_NEW_WRAPPERS
NAMED_OPERANDS((0, object), (1, elements), (2, index), (3, value))
- AliasSet getAliasSet() const override {
- return AliasSet::Store(AliasSet::ObjectFields | AliasSet::Element);
- }
bool needsHoleCheck() const { return needsHoleCheck_; }
ALLOW_CLONE(MFallibleStoreElement)
};
// Store an unboxed object or null pointer to an elements vector.
class MStoreUnboxedObjectOrNull : public MQuaternaryInstruction,
public StoreUnboxedObjectOrNullPolicy::Data {