From 49fb2e23bb3c932389f23fdda33a32d034ca9a0c Mon Sep 17 00:00:00 2001 From: Thomas Lively Date: Wed, 21 Dec 2022 11:47:48 -0600 Subject: Support `ref.test null` (#5368) This new variant of ref.test returns 1 if the input is null. --- test/example/c-api-kitchen-sink.c | 5 ++--- test/example/c-api-kitchen-sink.txt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'test/example') diff --git a/test/example/c-api-kitchen-sink.c b/test/example/c-api-kitchen-sink.c index 0dadeef1d..de105d239 100644 --- a/test/example/c-api-kitchen-sink.c +++ b/test/example/c-api-kitchen-sink.c @@ -1102,9 +1102,8 @@ void test_core() { BinaryenI31New(module, makeInt32(module, 0)), BinaryenI31Get(module, i31refExpr, 1), BinaryenI31Get(module, BinaryenI31New(module, makeInt32(module, 2)), 0), - BinaryenRefTest(module, - BinaryenGlobalGet(module, "i8Array-global", i8Array), - BinaryenTypeGetHeapType(i8Array)), + BinaryenRefTest( + module, BinaryenGlobalGet(module, "i8Array-global", i8Array), i8Array), BinaryenRefCast( module, BinaryenGlobalGet(module, "i8Array-global", i8Array), i8Array), BinaryenStructNew(module, 0, 0, BinaryenTypeGetHeapType(i32Struct)), diff --git a/test/example/c-api-kitchen-sink.txt b/test/example/c-api-kitchen-sink.txt index 41f96c184..1ee529eb3 100644 --- a/test/example/c-api-kitchen-sink.txt +++ b/test/example/c-api-kitchen-sink.txt @@ -2165,7 +2165,7 @@ BinaryenFeatureAll: 126975 ) ) (drop - (ref.test $[mut:i8] + (ref.test null $[mut:i8] (global.get $i8Array-global) ) ) -- cgit v1.2.3