summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2021-05-18 15:58:31 -0700
committerGitHub <noreply@github.com>2021-05-18 15:58:31 -0700
commit92b0cbdd9e2747c5cf6ecc546718d0ec0b1bc64b (patch)
tree988bdc1753ba73f41b7c2c5613170fa638a1e5f9 /src/wasm-type.h
parentf8bb9c228446998882edea012bf9fa3004262504 (diff)
downloadbinaryen-92b0cbdd9e2747c5cf6ecc546718d0ec0b1bc64b.tar.gz
binaryen-92b0cbdd9e2747c5cf6ecc546718d0ec0b1bc64b.tar.bz2
binaryen-92b0cbdd9e2747c5cf6ecc546718d0ec0b1bc64b.zip
Remove Type ordering (#3793)
As found in #3682, the current implementation of type ordering is not correct, and although the immediate issue would be easy to fix, I don't think the current intended comparison algorithm is correct in the first place. Rather than try to switch to using a correct algorithm (which I am not sure I know how to implement, although I have an idea) this PR removes Type ordering entirely. In places that used Type ordering with std::set or std::map because they require deterministic iteration order, this PR uses InsertOrdered{Set,Map} instead.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 41a89d4fe..03e8c129f 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -173,9 +173,6 @@ public:
bool operator!=(const Type& other) const { return id != other.id; }
bool operator!=(const BasicType& other) const { return id != other; }
- // Order types by some notion of simplicity.
- bool operator<(const Type& other) const;
-
// Returns the type size in bytes. Only single types are supported.
unsigned getByteSize() const;
@@ -362,9 +359,6 @@ public:
bool operator!=(const HeapType& other) const { return id != other.id; }
bool operator!=(const BasicHeapType& other) const { return id != other; }
- // Order heap types by some notion of simplicity.
- bool operator<(const HeapType& other) const;
-
// Returns true if left is a subtype of right. Subtype includes itself.
static bool isSubType(HeapType left, HeapType right);
@@ -414,7 +408,6 @@ struct Signature {
return params == other.params && results == other.results;
}
bool operator!=(const Signature& other) const { return !(*this == other); }
- bool operator<(const Signature& other) const;
std::string toString() const;
};