From bcc76146fed433cbc8ba01a9f568d979c145110b Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 30 Dec 2019 17:55:20 -0800 Subject: Add support for reference types proposal (#2451) This adds support for the reference type proposal. This includes support for all reference types (`anyref`, `funcref`(=`anyfunc`), and `nullref`) and four new instructions: `ref.null`, `ref.is_null`, `ref.func`, and new typed `select`. This also adds subtype relationship support between reference types. This does not include table instructions yet. This also does not include wasm2js support. Fixes #2444 and fixes #2447. --- src/ir/utils.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ir/utils.h') diff --git a/src/ir/utils.h b/src/ir/utils.h index cad7bc885..9bd3c9e0b 100644 --- a/src/ir/utils.h +++ b/src/ir/utils.h @@ -146,6 +146,9 @@ struct ReFinalize void visitDrop(Drop* curr); void visitReturn(Return* curr); void visitHost(Host* curr); + void visitRefNull(RefNull* curr); + void visitRefIsNull(RefIsNull* curr); + void visitRefFunc(RefFunc* curr); void visitTry(Try* curr); void visitThrow(Throw* curr); void visitRethrow(Rethrow* curr); @@ -210,6 +213,9 @@ struct ReFinalizeNode : public OverriddenVisitor { void visitDrop(Drop* curr) { curr->finalize(); } void visitReturn(Return* curr) { curr->finalize(); } void visitHost(Host* curr) { curr->finalize(); } + void visitRefNull(RefNull* curr) { curr->finalize(); } + void visitRefIsNull(RefIsNull* curr) { curr->finalize(); } + void visitRefFunc(RefFunc* curr) { curr->finalize(); } void visitTry(Try* curr) { curr->finalize(); } void visitThrow(Throw* curr) { curr->finalize(); } void visitRethrow(Rethrow* curr) { curr->finalize(); } -- cgit v1.2.3