From eafb0a4ef25cd82317ac8fa84a9d7e58f9382fcc Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Mon, 1 Feb 2021 22:44:40 +0000 Subject: [GC] br_on_null (#3528) This is only partial support, as br_on_null also has an extra optional value in the spec. Implementing that is cumbersome in binaryen, and there is ongoing spec discussions about it (see https://github.com/WebAssembly/function-references/issues/45 ), so for now we only support the simple case without the default value. Also fix prefixed opcodes to be LEBs in RefAs, which was noticed here as the change here made it noticeable whether the values were int8 or LEBs. --- src/passes/Print.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/passes/Print.cpp') diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 9e1afffd4..39c66cc57 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -1785,6 +1785,9 @@ struct PrintExpressionContents } void visitBrOn(BrOn* curr) { switch (curr->op) { + case BrOnNull: + printMedium(o, "br_on_null "); + break; case BrOnCast: printMedium(o, "br_on_cast "); break; -- cgit v1.2.3