summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-02-14 11:07:03 -0600
committerBen Smith <binjimin@gmail.com>2019-02-14 09:07:03 -0800
commit2b33a37dc49c033ba9b34f438233f204002415d9 (patch)
treec7c091542e4287b2e19dfb644e5186ce42235cf0 /src/common.h
parent19191efaf1b5b92b0357b303be1b25cf439be9a2 (diff)
downloadwabt-2b33a37dc49c033ba9b34f438233f204002415d9.tar.gz
wabt-2b33a37dc49c033ba9b34f438233f204002415d9.tar.bz2
wabt-2b33a37dc49c033ba9b34f438233f204002415d9.zip
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.
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common.h b/src/common.h
index 4a2311d4..49c1ce60 100644
--- a/src/common.h
+++ b/src/common.h
@@ -205,6 +205,7 @@ enum class Type : int32_t {
F64 = -0x04, // 0x7c
V128 = -0x05, // 0x7b
Anyfunc = -0x10, // 0x70
+ Anyref = -0x11, // 0x6f
ExceptRef = -0x18, // 0x68
Func = -0x20, // 0x60
Void = -0x40, // 0x40
@@ -359,6 +360,8 @@ static WABT_INLINE const char* GetTypeName(Type type) {
return "void";
case Type::Any:
return "any";
+ case Type::Anyref:
+ return "anyref";
default:
return "<type index>";
}