diff options
Diffstat (limited to 'src/ir')
-rw-r--r-- | src/ir/module-utils.cpp | 2 | ||||
-rw-r--r-- | src/ir/possible-contents.cpp | 2 | ||||
-rw-r--r-- | src/ir/struct-utils.h | 2 | ||||
-rw-r--r-- | src/ir/subtypes.h | 4 | ||||
-rw-r--r-- | src/ir/type-updating.cpp | 6 | ||||
-rw-r--r-- | src/ir/type-updating.h | 8 |
6 files changed, 12 insertions, 12 deletions
diff --git a/src/ir/module-utils.cpp b/src/ir/module-utils.cpp index ed147053b..0da47e811 100644 --- a/src/ir/module-utils.cpp +++ b/src/ir/module-utils.cpp @@ -406,7 +406,7 @@ Counts getHeapTypeCounts(Module& wasm, bool prune = false) { } } - if (auto super = ht.getSuperType()) { + if (auto super = ht.getDeclaredSuperType()) { if (!counts.count(*super)) { newTypes.insert(*super); // We should unconditionally count supertypes, but while the type system diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp index 27ba8c759..06d380a95 100644 --- a/src/ir/possible-contents.cpp +++ b/src/ir/possible-contents.cpp @@ -1559,7 +1559,7 @@ void TNHOracle::infer() { } while (1) { typeFunctions[type].push_back(func.get()); - if (auto super = type.getSuperType()) { + if (auto super = type.getDeclaredSuperType()) { type = *super; } else { break; diff --git a/src/ir/struct-utils.h b/src/ir/struct-utils.h index 4e24aacf4..150061720 100644 --- a/src/ir/struct-utils.h +++ b/src/ir/struct-utils.h @@ -269,7 +269,7 @@ private: if (toSuperTypes) { // Propagate shared fields to the supertype. - if (auto superType = type.getSuperType()) { + if (auto superType = type.getDeclaredSuperType()) { auto& superInfos = combinedInfos[*superType]; auto& superFields = superType->getStruct().fields; for (Index i = 0; i < superFields.size(); i++) { diff --git a/src/ir/subtypes.h b/src/ir/subtypes.h index ebf21e0ae..7cc633a75 100644 --- a/src/ir/subtypes.h +++ b/src/ir/subtypes.h @@ -86,7 +86,7 @@ struct SubTypes { SubTypesFirstSort(const SubTypes& parent) : parent(parent) { for (auto type : parent.types) { // The roots are types with no supertype. - if (!type.getSuperType()) { + if (!type.getDeclaredSuperType()) { push(type); } } @@ -198,7 +198,7 @@ struct SubTypes { private: // Add a type to the graph. void note(HeapType type) { - if (auto super = type.getSuperType()) { + if (auto super = type.getDeclaredSuperType()) { typeSubTypes[*super].push_back(type); } } diff --git a/src/ir/type-updating.cpp b/src/ir/type-updating.cpp index 642992d7e..42ab2849a 100644 --- a/src/ir/type-updating.cpp +++ b/src/ir/type-updating.cpp @@ -46,8 +46,8 @@ GlobalTypeRewriter::TypeMap GlobalTypeRewriter::rebuildTypes() { GlobalTypeRewriter& parent; SupertypesFirst(GlobalTypeRewriter& parent) : parent(parent) {} - std::optional<HeapType> getSuperType(HeapType type) { - return parent.getSuperType(type); + std::optional<HeapType> getDeclaredSuperType(HeapType type) { + return parent.getDeclaredSuperType(type); } }; @@ -106,7 +106,7 @@ GlobalTypeRewriter::TypeMap GlobalTypeRewriter::rebuildTypes() { } // Apply a super, if there is one - if (auto super = getSuperType(type)) { + if (auto super = getDeclaredSuperType(type)) { if (auto it = typeIndices.find(*super); it != typeIndices.end()) { assert(it->second < i); typeBuilder[i].subTypeOf(typeBuilder[it->second]); diff --git a/src/ir/type-updating.h b/src/ir/type-updating.h index ddeb74b31..92913699e 100644 --- a/src/ir/type-updating.h +++ b/src/ir/type-updating.h @@ -384,8 +384,8 @@ public: // Subclasses can override this method to modify supertypes. The new // supertype, if any, must be a supertype (or the same as) the original // supertype. - virtual std::optional<HeapType> getSuperType(HeapType oldType) { - return oldType.getSuperType(); + virtual std::optional<HeapType> getDeclaredSuperType(HeapType oldType) { + return oldType.getDeclaredSuperType(); } // Map an old type to a temp type. This can be called from the above hooks, @@ -506,9 +506,9 @@ public: sig.params = getUpdatedTypeList(oldSig.params); sig.results = getUpdatedTypeList(oldSig.results); } - std::optional<HeapType> getSuperType(HeapType oldType) override { + std::optional<HeapType> getDeclaredSuperType(HeapType oldType) override { // If the super is mapped, get it from the mapping. - auto super = oldType.getSuperType(); + auto super = oldType.getDeclaredSuperType(); if (super) { if (auto it = mapping.find(*super); it != mapping.end()) { return it->second; |