summaryrefslogtreecommitdiff
path: root/src/wasm
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2020-04-09 16:42:42 -0700
committerGitHub <noreply@github.com>2020-04-09 16:42:42 -0700
commitc2760038591df9e67b49bb71c9aedb70eadb5b11 (patch)
tree8122128aaf9944800c8f6ad1107ca0da4b88ba92 /src/wasm
parent1cfaf2e723968443611b06895212d4328b4881de (diff)
downloadbinaryen-c2760038591df9e67b49bb71c9aedb70eadb5b11.tar.gz
binaryen-c2760038591df9e67b49bb71c9aedb70eadb5b11.tar.bz2
binaryen-c2760038591df9e67b49bb71c9aedb70eadb5b11.zip
Handle tuples in Asyncify call support (#2743)
Instead of adding globals for hardcoded basic types, traverse the module to collect all call types that might need to be handled and emit a global for each of them. Adapted from #2712.
Diffstat (limited to 'src/wasm')
-rw-r--r--src/wasm/wasm-type.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index da7fb50b6..aed13b6d1 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -35,6 +35,10 @@ public:
}
};
+size_t std::hash<wasm::Type>::operator()(const wasm::Type& type) const {
+ return std::hash<uint32_t>{}(type.getID());
+}
+
size_t std::hash<wasm::Signature>::
operator()(const wasm::Signature& sig) const {
return std::hash<uint64_t>{}(uint64_t(sig.params.getID()) << 32 |