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/passes/ConstHoisting.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/passes/ConstHoisting.cpp') diff --git a/src/passes/ConstHoisting.cpp b/src/passes/ConstHoisting.cpp index dbb3853d8..4e8cd9910 100644 --- a/src/passes/ConstHoisting.cpp +++ b/src/passes/ConstHoisting.cpp @@ -91,9 +91,12 @@ private: size = value.type.getByteSize(); break; } - case v128: // v128 not implemented yet - case anyref: // anyref cannot have literals - case exnref: { // exnref cannot have literals + // not implemented yet + case v128: + case funcref: + case anyref: + case nullref: + case exnref: { return false; } case none: -- cgit v1.2.3