diff options
Diffstat (limited to 'src/passes')
-rw-r--r-- | src/passes/Print.cpp | 2 | ||||
-rw-r--r-- | src/passes/TypeMerging.cpp | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 4bcc042a1..ab5ef514f 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -254,7 +254,7 @@ void TypeNamePrinter::print(HeapType type) { void TypeNamePrinter::print(const Tuple& tuple) { auto sep = ""; - for (auto type : tuple.types) { + for (auto type : tuple) { os << sep; sep = "_"; print(type); diff --git a/src/passes/TypeMerging.cpp b/src/passes/TypeMerging.cpp index 04bc4b850..1897adc3c 100644 --- a/src/passes/TypeMerging.cpp +++ b/src/passes/TypeMerging.cpp @@ -587,11 +587,11 @@ size_t shapeHash(Type a) { } bool shapeEq(const Tuple& a, const Tuple& b) { - if (a.types.size() != b.types.size()) { + if (a.size() != b.size()) { return false; } - for (size_t i = 0; i < a.types.size(); ++i) { - if (!shapeEq(a.types[i], b.types[i])) { + for (size_t i = 0; i < a.size(); ++i) { + if (!shapeEq(a[i], b[i])) { return false; } } @@ -599,8 +599,8 @@ bool shapeEq(const Tuple& a, const Tuple& b) { } size_t shapeHash(const Tuple& a) { - auto digest = hash(a.types.size()); - for (auto type : a.types) { + auto digest = hash(a.size()); + for (auto type : a) { hash_combine(digest, shapeHash(type)); } return digest; |