diff options
author | Daniel Wirtz <dcode@dcode.io> | 2020-09-21 09:45:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 09:45:58 +0200 |
commit | 51350a8d2e7a361cf658951798351fc242420328 (patch) | |
tree | 8bc71e9126b719c4d1785d0f5bbb6248a601176f /src/wasm/wasm-s-parser.cpp | |
parent | e35cdb97adf6eb2ade2be7734d1c6c397d440dc1 (diff) | |
download | binaryen-51350a8d2e7a361cf658951798351fc242420328.tar.gz binaryen-51350a8d2e7a361cf658951798351fc242420328.tar.bz2 binaryen-51350a8d2e7a361cf658951798351fc242420328.zip |
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.
Diffstat (limited to 'src/wasm/wasm-s-parser.cpp')
-rw-r--r-- | src/wasm/wasm-s-parser.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<RefEq>(); + 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 // ... |