summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-10-17 08:58:48 -0700
committerGitHub <noreply@github.com>2023-10-17 08:58:48 -0700
commitede148eaa505d3681abd67b0b4d7de1b82ec05ff (patch)
tree03efacbe949fe82ae0cd91e5b37bc866de950ed1 /src/tools
parent2d1e1501f5da1436f61c8ff5440aca33e25a29e9 (diff)
downloadbinaryen-ede148eaa505d3681abd67b0b4d7de1b82ec05ff.tar.gz
binaryen-ede148eaa505d3681abd67b0b4d7de1b82ec05ff.tar.bz2
binaryen-ede148eaa505d3681abd67b0b4d7de1b82ec05ff.zip
[NFC] Rename getSuperType to getDeclaredSuperType (#6015)
A later PR will add getSuperType which will mean "get the general super type - either declared, or not".
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/fuzzing/fuzzing.cpp4
-rw-r--r--src/tools/fuzzing/heap-types.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp
index f776c1c9d..2e7755848 100644
--- a/src/tools/fuzzing/fuzzing.cpp
+++ b/src/tools/fuzzing/fuzzing.cpp
@@ -766,7 +766,7 @@ void TranslateToFuzzReader::recombine(Function* func) {
while (1) {
ret.push_back(Type(heapType, nullability));
// TODO: handle basic supertypes too
- auto super = heapType.getSuperType();
+ auto super = heapType.getDeclaredSuperType();
if (!super) {
break;
}
@@ -3885,7 +3885,7 @@ HeapType TranslateToFuzzReader::getSuperType(HeapType type) {
std::vector<HeapType> supers;
while (1) {
supers.push_back(type);
- if (auto super = type.getSuperType()) {
+ if (auto super = type.getDeclaredSuperType()) {
type = *super;
} else {
break;
diff --git a/src/tools/fuzzing/heap-types.cpp b/src/tools/fuzzing/heap-types.cpp
index c8980cbe8..32a3fd960 100644
--- a/src/tools/fuzzing/heap-types.cpp
+++ b/src/tools/fuzzing/heap-types.cpp
@@ -657,7 +657,7 @@ void Inhabitator::markNullable(FieldPos field) {
// Mark the field null in all supertypes. If the supertype field is
// already nullable or does not exist, that's ok and this will have no
// effect.
- while (auto super = curr.getSuperType()) {
+ while (auto super = curr.getDeclaredSuperType()) {
nullables.insert({*super, idx});
curr = *super;
}
@@ -666,12 +666,12 @@ void Inhabitator::markNullable(FieldPos field) {
// Find the top type for which this field exists and mark the field
// nullable in all of its subtypes.
if (curr.isArray()) {
- while (auto super = curr.getSuperType()) {
+ while (auto super = curr.getDeclaredSuperType()) {
curr = *super;
}
} else {
assert(curr.isStruct());
- while (auto super = curr.getSuperType()) {
+ while (auto super = curr.getDeclaredSuperType()) {
if (super->getStruct().fields.size() <= idx) {
break;
}
@@ -885,7 +885,7 @@ std::vector<HeapType> Inhabitator::build() {
// Establish supertypes and finality.
for (size_t i = 0; i < types.size(); ++i) {
- if (auto super = types[i].getSuperType()) {
+ if (auto super = types[i].getDeclaredSuperType()) {
if (auto it = typeIndices.find(*super); it != typeIndices.end()) {
builder[i].subTypeOf(builder[it->second]);
} else {