From 6e17bebf4419a648234346cdc3ed871dd3a7ec41 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 30 Nov 2018 16:41:54 -0800 Subject: [PATCH] Publish `TableElementType` for library users. --- lib/wasm/src/lib.rs | 3 ++- lib/wasm/src/translation_utils.rs | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/wasm/src/lib.rs b/lib/wasm/src/lib.rs index 6c23f97640..354a62f9e8 100644 --- a/lib/wasm/src/lib.rs +++ b/lib/wasm/src/lib.rs @@ -64,7 +64,8 @@ pub use func_translator::FuncTranslator; pub use module_translator::translate_module; pub use translation_utils::{ DefinedFuncIndex, DefinedGlobalIndex, DefinedMemoryIndex, DefinedTableIndex, FuncIndex, Global, - GlobalIndex, GlobalInit, Memory, MemoryIndex, SignatureIndex, Table, TableIndex, + GlobalIndex, GlobalInit, Memory, MemoryIndex, SignatureIndex, Table, TableElementType, + TableIndex, }; #[cfg(not(feature = "std"))] diff --git a/lib/wasm/src/translation_utils.rs b/lib/wasm/src/translation_utils.rs index 9b81c28a2d..02e03cb386 100644 --- a/lib/wasm/src/translation_utils.rs +++ b/lib/wasm/src/translation_utils.rs @@ -90,7 +90,9 @@ pub struct Table { /// WebAssembly table element. Can be a function or a scalar type. #[derive(Debug, Clone, Copy)] pub enum TableElementType { + /// A scalar type. Val(ir::Type), + /// A function. Func, }