mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Bug 1603406 - Part 15: Unused TypeInference functions. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D56905 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
1b50af4997
commit
cff8340d20
@ -1333,16 +1333,6 @@ TaggedProto TypeSet::ObjectKey::proto() {
|
||||
return isGroup() ? group()->proto() : singleton()->taggedProto();
|
||||
}
|
||||
|
||||
TypeNewScript* TypeSet::ObjectKey::newScript() {
|
||||
if (isGroup()) {
|
||||
AutoSweepObjectGroup sweep(group());
|
||||
if (group()->newScript(sweep)) {
|
||||
return group()->newScript(sweep);
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ObjectGroup* TypeSet::ObjectKey::maybeGroup() {
|
||||
if (isGroup()) {
|
||||
return group();
|
||||
@ -1800,19 +1790,6 @@ bool HeapTypeSetKey::isOwnProperty(CompilerConstraintList* constraints,
|
||||
return false;
|
||||
}
|
||||
|
||||
bool HeapTypeSetKey::knownSubset(CompilerConstraintList* constraints,
|
||||
const HeapTypeSetKey& other) {
|
||||
if (!maybeTypes() || maybeTypes()->empty()) {
|
||||
freeze(constraints);
|
||||
return true;
|
||||
}
|
||||
if (!other.maybeTypes() || !maybeTypes()->isSubset(other.maybeTypes())) {
|
||||
return false;
|
||||
}
|
||||
freeze(constraints);
|
||||
return true;
|
||||
}
|
||||
|
||||
JSObject* TemporaryTypeSet::maybeSingleton() {
|
||||
if (baseFlags() != 0 || baseObjectCount() != 1) {
|
||||
return nullptr;
|
||||
@ -3494,17 +3471,6 @@ void PreliminaryObjectArray::registerNewObject(PlainObject* res) {
|
||||
MOZ_CRASH("There should be room for registering the new object");
|
||||
}
|
||||
|
||||
void PreliminaryObjectArray::unregisterObject(PlainObject* obj) {
|
||||
for (size_t i = 0; i < COUNT; i++) {
|
||||
if (objects[i] == obj) {
|
||||
objects[i] = nullptr;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
MOZ_CRASH("The object should be in the array");
|
||||
}
|
||||
|
||||
bool PreliminaryObjectArray::full() const {
|
||||
for (size_t i = 0; i < COUNT; i++) {
|
||||
if (!objects[i]) {
|
||||
@ -3514,15 +3480,6 @@ bool PreliminaryObjectArray::full() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PreliminaryObjectArray::empty() const {
|
||||
for (size_t i = 0; i < COUNT; i++) {
|
||||
if (objects[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void PreliminaryObjectArray::sweep() {
|
||||
// All objects in the array are weak, so clear any that are about to be
|
||||
// destroyed.
|
||||
|
@ -179,7 +179,6 @@ class PreliminaryObjectArray {
|
||||
PreliminaryObjectArray() = default;
|
||||
|
||||
void registerNewObject(PlainObject* res);
|
||||
void unregisterObject(PlainObject* obj);
|
||||
|
||||
JSObject* get(size_t i) const {
|
||||
MOZ_ASSERT(i < COUNT);
|
||||
@ -187,7 +186,6 @@ class PreliminaryObjectArray {
|
||||
}
|
||||
|
||||
bool full() const;
|
||||
bool empty() const;
|
||||
void sweep();
|
||||
};
|
||||
|
||||
|
@ -288,7 +288,6 @@ class TypeSet {
|
||||
|
||||
const JSClass* clasp();
|
||||
TaggedProto proto();
|
||||
TypeNewScript* newScript();
|
||||
|
||||
bool unknownProperties();
|
||||
bool hasFlags(CompilerConstraintList* constraints, ObjectGroupFlags flags);
|
||||
@ -326,8 +325,6 @@ class TypeSet {
|
||||
return ValueType(data);
|
||||
}
|
||||
|
||||
bool isMagicArguments() const { return primitive() == ValueType::Magic; }
|
||||
|
||||
bool isSomeObject() const {
|
||||
return data == JSVAL_TYPE_OBJECT || data > JSVAL_TYPE_UNKNOWN;
|
||||
}
|
||||
@ -675,14 +672,6 @@ class ConstraintTypeSet : public TypeSet {
|
||||
}
|
||||
return constraintList_;
|
||||
}
|
||||
void setConstraintList(TypeConstraint* constraint) {
|
||||
MOZ_ASSERT(!constraintList_);
|
||||
checkMagic();
|
||||
if (constraint) {
|
||||
constraint->checkMagic();
|
||||
}
|
||||
constraintList_ = constraint;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a type to this set, calling any constraint handlers if this is a new
|
||||
@ -758,10 +747,6 @@ class TemporaryTypeSet : public TypeSet {
|
||||
/* Get any type tag which all values in this set must have. */
|
||||
jit::MIRType getKnownMIRType();
|
||||
|
||||
bool isMagicArguments() {
|
||||
return getKnownMIRType() == jit::MIRType::MagicOptimizedArguments;
|
||||
}
|
||||
|
||||
/* Whether this value may be an object. */
|
||||
bool maybeObject() { return unknownObject() || baseObjectCount() > 0; }
|
||||
|
||||
@ -919,8 +904,6 @@ class HeapTypeSetKey {
|
||||
bool nonWritable(CompilerConstraintList* constraints);
|
||||
bool isOwnProperty(CompilerConstraintList* constraints,
|
||||
bool allowEmptyTypesForGlobal = false);
|
||||
bool knownSubset(CompilerConstraintList* constraints,
|
||||
const HeapTypeSetKey& other);
|
||||
JSObject* singleton(CompilerConstraintList* constraints);
|
||||
bool needsBarrier(CompilerConstraintList* constraints);
|
||||
bool constant(CompilerConstraintList* constraints, Value* valOut);
|
||||
|
Loading…
Reference in New Issue
Block a user