summaryrefslogtreecommitdiff
path: root/src/wasm-type.h
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2023-06-15 13:58:19 -0700
committerGitHub <noreply@github.com>2023-06-15 13:58:19 -0700
commit599a9627ce88b66eeb4e2be24163fa62f0533743 (patch)
tree1133da8d2c66466c1d2dda80959fe85bda8c40a7 /src/wasm-type.h
parent00211a90878cf0f37fbfb124332c4abc9863032b (diff)
downloadbinaryen-599a9627ce88b66eeb4e2be24163fa62f0533743.tar.gz
binaryen-599a9627ce88b66eeb4e2be24163fa62f0533743.tar.bz2
binaryen-599a9627ce88b66eeb4e2be24163fa62f0533743.zip
[NFC] Rewrite isorecursive canonicalization (#5774)
Rewrite the type canonicalization algorithm to fully canonicalize a single rec group at a time rather than canonicalizing multiple rec groups at once in multiple stages. The previous code was useful when it had to be shared with equirecursive and nominal canonicalization, but was much more complicated than necessary for just isorecursive canonicalization, which is all we support today.
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r--src/wasm-type.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h
index 65fdd5650..095186c3c 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -631,6 +631,7 @@ struct TypeBuilder {
const std::vector<HeapType>& operator*() const {
return std::get<std::vector<HeapType>>(*this);
}
+ const std::vector<HeapType>* operator->() const { return &*(*this); }
const Error* getError() const { return std::get_if<Error>(this); }
};