- bool isSubsetOf(const StructureSet& other) const
- {
- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (!other.contains(m_structures[i]))
- return false;
- }
- return true;
- }
-
- bool isSupersetOf(const StructureSet& other) const
- {
- return other.isSubsetOf(*this);
- }
-
- bool overlaps(const StructureSet& other) const
- {
- for (size_t i = 0; i < m_structures.size(); ++i) {
- if (other.contains(m_structures[i]))
- return true;
- }
- return false;
- }
-
- size_t size() const { return m_structures.size(); }
-
- // Call this if you know that the structure set must consist of exactly
- // one structure.
- Structure* singletonStructure() const
- {
- ASSERT(m_structures.size() == 1);
- return m_structures[0];
- }
-
- Structure* at(size_t i) const { return m_structures.at(i); }
-
- Structure* operator[](size_t i) const { return at(i); }
-
- Structure* last() const { return m_structures.last(); }
-
- SpeculatedType speculationFromStructures() const