From 2b33a37dc49c033ba9b34f438233f204002415d9 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 14 Feb 2019 11:07:03 -0600 Subject: Add support for the reference types proposal (#938) * Add support for the reference types proposal This commit adds support for the reference types proposal to wabt. Namely it adds new opcodes like `table.{get,set,grow}` as well as adds a new `anyref` type. These are plumbed throughout for various operations in relatively simple fashions, no support was added for a subtyping relationship between `anyref` and `anyfunc` just yet. This also raises the restriction that multiple tables are disallowed, allowing multiple tables to exist when `--enable-reference-types` is passed. * Allow nonzero table indices in `call_indirect` Plumb support throughout for the `call_indirect` instruction (and `return_call_indirect`) to work with multi-table modules according to the reference types proposal. --- src/ir.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ir.cc') diff --git a/src/ir.cc b/src/ir.cc index 52af00f1..70ca45c3 100644 --- a/src/ir.cc +++ b/src/ir.cc @@ -58,6 +58,8 @@ const char* ExprTypeName[] = { "MemoryInit", "MemorySize", "Nop", + "RefIsNull", + "RefNull", "Rethrow", "Return", "ReturnCall", @@ -69,6 +71,10 @@ const char* ExprTypeName[] = { "TableCopy", "ElemDrop", "TableInit", + "TableGet", + "TableGrow", + "TableSize", + "TableSet", "Ternary", "Throw", "Try", -- cgit v1.2.3