summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/TypeMerging.cpp4
-rw-r--r--src/passes/TypeSSA.cpp5
2 files changed, 5 insertions, 4 deletions
diff --git a/src/passes/TypeMerging.cpp b/src/passes/TypeMerging.cpp
index ea1fa7916..3d7a032b5 100644
--- a/src/passes/TypeMerging.cpp
+++ b/src/passes/TypeMerging.cpp
@@ -538,7 +538,7 @@ bool shapeEq(HeapType a, HeapType b) {
// Check whether `a` and `b` have the same top-level structure, including the
// position and identity of any children that are not included as transitions
// in the DFA, i.e. any children that are not nontrivial references.
- if (a.isFinal() != b.isFinal()) {
+ if (a.isOpen() != b.isOpen()) {
return false;
}
if (a.isStruct() && b.isStruct()) {
@@ -554,7 +554,7 @@ bool shapeEq(HeapType a, HeapType b) {
}
size_t shapeHash(HeapType a) {
- size_t digest = hash(a.isFinal());
+ size_t digest = hash(a.isOpen());
if (a.isStruct()) {
rehash(digest, 0);
hash_combine(digest, shapeHash(a.getStruct()));
diff --git a/src/passes/TypeSSA.cpp b/src/passes/TypeSSA.cpp
index f44df96e1..cb8f0f049 100644
--- a/src/passes/TypeSSA.cpp
+++ b/src/passes/TypeSSA.cpp
@@ -110,7 +110,7 @@ std::vector<HeapType> ensureTypesAreInNewRecGroup(RecGroup recGroup,
if (auto super = type.getSuperType()) {
builder[i].subTypeOf(*super);
}
- builder[i].setFinal(type.isFinal());
+ builder[i].setOpen(type.isOpen());
}
// Implement the hash as a struct with "random" fields, and add it.
@@ -255,6 +255,7 @@ struct TypeSSA : public Pass {
builder[i] = oldType.getArray();
}
builder[i].subTypeOf(oldType);
+ builder[i].setOpen();
}
builder.createRecGroup(0, num);
auto result = builder.build();
@@ -311,7 +312,7 @@ struct TypeSSA : public Pass {
return false;
}
- if (curr->type.getHeapType().isFinal()) {
+ if (!curr->type.getHeapType().isOpen()) {
// We can't create new subtypes of a final type anyway.
return false;
}