diff options
author | Alon Zakai <azakai@google.com> | 2021-01-29 02:47:52 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-28 18:47:52 -0800 |
commit | bbf40d06a162be8f88a60d1fc4edc3f0015c6c91 (patch) | |
tree | e1919618535c320632ed05dbc770bcc516a2e013 /src/wasm/wasm.cpp | |
parent | 6299471584ce74d365526e33ed0a662bd2ee3490 (diff) | |
download | binaryen-bbf40d06a162be8f88a60d1fc4edc3f0015c6c91.tar.gz binaryen-bbf40d06a162be8f88a60d1fc4edc3f0015c6c91.tar.bz2 binaryen-bbf40d06a162be8f88a60d1fc4edc3f0015c6c91.zip |
[GC] ref.as_non_null (#3527)
This is different than the other RefAs variants in that it is part of the
typed functions proposal, and not GC. But it is part of GC prototype 3.
Note: This is not useful to us yet as we don't support non-nullable types.
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index a62435412..a94bda066 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -1036,6 +1036,10 @@ void RefAs::finalize() { return; } switch (op) { + case RefAsNonNull: + // FIXME: when we support non-nullable types, switch to NonNullable + type = Type(value->type.getHeapType(), Nullable); + break; case RefAsFunc: type = Type::funcref; break; |