From 51350a8d2e7a361cf658951798351fc242420328 Mon Sep 17 00:00:00 2001 From: Daniel Wirtz Date: Mon, 21 Sep 2020 09:45:58 +0200 Subject: GC: Add ref.eq instruction (#3145) With `eqref` now integrated, the `ref.eq` instruction can be implemented. The only valid LHS and RHS value is `(ref.null eq)` for now, but implementation and fuzzer integration is otherwise complete. --- src/wasm/wasm-s-parser.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/wasm/wasm-s-parser.cpp') diff --git a/src/wasm/wasm-s-parser.cpp b/src/wasm/wasm-s-parser.cpp index 2aa60979f..1bb83ec94 100644 --- a/src/wasm/wasm-s-parser.cpp +++ b/src/wasm/wasm-s-parser.cpp @@ -1850,6 +1850,14 @@ Expression* SExpressionWasmBuilder::makeRefFunc(Element& s) { return ret; } +Expression* SExpressionWasmBuilder::makeRefEq(Element& s) { + auto ret = allocator.alloc(); + ret->left = parseExpression(s[1]); + ret->right = parseExpression(s[2]); + ret->finalize(); + return ret; +} + // try-catch-end is written in the folded wast format as // (try // ... -- cgit v1.2.3