summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 5c1baaf09..38a030e1a 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -1065,8 +1065,7 @@ public:
FunctionType() : result(none) {}
- bool operator==(FunctionType& b) {
- if (name != b.name) return false; // XXX
+ bool structuralComparison(FunctionType& b) {
if (result != b.result) return false;
if (params.size() != b.params.size()) return false;
for (size_t i = 0; i < params.size(); i++) {
@@ -1074,6 +1073,11 @@ public:
}
return true;
}
+
+ bool operator==(FunctionType& b) {
+ if (name != b.name) return false;
+ return structuralComparison(b);
+ }
bool operator!=(FunctionType& b) {
return !(*this == b);
}