diff options
Diffstat (limited to 'src/wasm/wasm.cpp')
-rw-r--r-- | src/wasm/wasm.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 6cc61a8a1..0b45f494d 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -192,6 +192,8 @@ const char* getExpressionName(Expression* curr) { return "ref.is_null"; case Expression::Id::RefFuncId: return "ref.func"; + case Expression::Id::RefEqId: + return "ref.eq"; case Expression::Id::TryId: return "try"; case Expression::Id::ThrowId: @@ -915,6 +917,14 @@ void RefIsNull::finalize() { void RefFunc::finalize() { type = Type::funcref; } +void RefEq::finalize() { + if (left->type == Type::unreachable || right->type == Type::unreachable) { + type = Type::unreachable; + } else { + type = Type::i32; + } +} + void Try::finalize() { type = Type::getLeastUpperBound(body->type, catchBody->type); } |