summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-07-28 14:16:19 -0700
committerGitHub <noreply@github.com>2016-07-28 14:16:19 -0700
commitcffbc4bc36f5e5f53e34f16ba4e687fdf130131d (patch)
tree0bf5c6d3bc347b2fddffce477a67826c9093a8be /src/wasm.h
parent3dc2e2579199fb0457846a22b3759ef16531b3da (diff)
downloadbinaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.tar.gz
binaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.tar.bz2
binaryen-cffbc4bc36f5e5f53e34f16ba4e687fdf130131d.zip
wast function type name desugaring is changing in spec:301 (#654)
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);
}