diff --git a/lib/api/src/externals.rs b/lib/api/src/externals.rs index 629825876..74f948f63 100644 --- a/lib/api/src/externals.rs +++ b/lib/api/src/externals.rs @@ -4,7 +4,7 @@ use crate::store::{Store, StoreObject}; use crate::types::{Val, ValAnyFunc}; use crate::Mutability; use crate::RuntimeError; -use crate::{ExternType, FuncType, GlobalType, MemoryType, TableType, ValType}; +use crate::{ExternType, FunctionType, GlobalType, MemoryType, TableType, ValType}; use std::cmp::max; use std::slice; use wasm_common::{Bytes, HostFunction, Pages, ValueType, WasmTypeList, WithEnv, WithoutEnv}; @@ -563,7 +563,7 @@ impl Func { } /// Returns the underlying type of this function. - pub fn ty(&self) -> FuncType { + pub fn ty(&self) -> FunctionType { self.store .engine() .lookup_signature(self.exported.signature) diff --git a/lib/api/src/lib.rs b/lib/api/src/lib.rs index d0f957b8a..adddd4c07 100644 --- a/lib/api/src/lib.rs +++ b/lib/api/src/lib.rs @@ -22,7 +22,7 @@ pub use crate::ptr::{Array, Item, WasmPtr}; pub use crate::store::{Engine, Store, StoreObject}; pub use crate::tunables::Tunables; pub use crate::types::{ - AnyRef, ExportType, ExternType, FuncType, GlobalType, HostInfo, HostRef, ImportType, + AnyRef, ExportType, ExternType, FunctionType, GlobalType, HostInfo, HostRef, ImportType, MemoryType, Mutability, TableType, Val, ValType, }; diff --git a/lib/api/src/types.rs b/lib/api/src/types.rs index 4acb8fe40..b5886b208 100644 --- a/lib/api/src/types.rs +++ b/lib/api/src/types.rs @@ -4,7 +4,7 @@ use crate::RuntimeError; use std::ptr; use wasm_common::Value; pub use wasm_common::{ - AnyRef, ExportType, ExternType, FuncType, GlobalType, HostInfo, HostRef, ImportType, + AnyRef, ExportType, ExternType, FunctionType, GlobalType, HostInfo, HostRef, ImportType, MemoryType, Mutability, TableType, Type as ValType, }; diff --git a/lib/compiler-cranelift/src/compiler.rs b/lib/compiler-cranelift/src/compiler.rs index aa877a647..ccc95933c 100644 --- a/lib/compiler-cranelift/src/compiler.rs +++ b/lib/compiler-cranelift/src/compiler.rs @@ -14,7 +14,7 @@ use cranelift_codegen::{binemit, isa, Context}; use rayon::prelude::{IntoParallelRefIterator, ParallelIterator}; use wasm_common::entity::{EntityRef, PrimaryMap, SecondaryMap}; use wasm_common::{ - Features, FuncIndex, FuncType, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex, + Features, FuncIndex, FunctionType, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex, }; use wasmer_compiler::CompileError; use wasmer_compiler::{ @@ -288,7 +288,7 @@ impl Compiler for CraneliftCompiler { fn compile_wasm_trampolines( &self, - signatures: &[FuncType], + signatures: &[FunctionType], ) -> Result, CompileError> { signatures .par_iter() diff --git a/lib/compiler-cranelift/src/trampoline/wasm.rs b/lib/compiler-cranelift/src/trampoline/wasm.rs index 8fc64f70a..cbd70a9b9 100644 --- a/lib/compiler-cranelift/src/trampoline/wasm.rs +++ b/lib/compiler-cranelift/src/trampoline/wasm.rs @@ -14,14 +14,14 @@ use cranelift_codegen::print_errors::pretty_error; use cranelift_codegen::Context; use cranelift_codegen::{binemit, ir}; use cranelift_frontend::{FunctionBuilder, FunctionBuilderContext}; -use wasm_common::FuncType; +use wasm_common::FunctionType; use wasmer_compiler::{CompileError, CompiledFunction, CompiledFunctionFrameInfo, FunctionBody}; /// Create a trampoline for invoking a WebAssembly function. pub fn make_wasm_trampoline( isa: &dyn TargetIsa, fn_builder_ctx: &mut FunctionBuilderContext, - func_type: &FuncType, + func_type: &FunctionType, value_size: usize, ) -> Result { let pointer_type = isa.pointer_type(); diff --git a/lib/compiler-cranelift/src/translator/translation_utils.rs b/lib/compiler-cranelift/src/translator/translation_utils.rs index bb85630e9..ea0e45cd7 100644 --- a/lib/compiler-cranelift/src/translator/translation_utils.rs +++ b/lib/compiler-cranelift/src/translator/translation_utils.rs @@ -7,7 +7,7 @@ use cranelift_codegen::binemit::Reloc; use cranelift_codegen::ir::{self, AbiParam}; use cranelift_codegen::isa::TargetFrontendConfig; use cranelift_frontend::FunctionBuilder; -use wasm_common::{FuncType, Type}; +use wasm_common::{FunctionType, Type}; use wasmer_compiler::wasm_unsupported; use wasmer_compiler::wasmparser; use wasmer_compiler::RelocationKind; @@ -16,7 +16,7 @@ use wasmer_runtime::libcalls::LibCall; /// Helper function translate a Funciton signature into Cranelift Ir pub fn signature_to_cranelift_ir( - signature: &FuncType, + signature: &FunctionType, target_config: &TargetFrontendConfig, ) -> ir::Signature { let mut sig = ir::Signature::new(target_config.default_call_conv); diff --git a/lib/compiler-llvm/src/compiler.rs b/lib/compiler-llvm/src/compiler.rs index 7588ffe19..9e6ed448b 100644 --- a/lib/compiler-llvm/src/compiler.rs +++ b/lib/compiler-llvm/src/compiler.rs @@ -8,7 +8,7 @@ use crate::translator::FuncTranslator; use rayon::prelude::{IntoParallelRefIterator, ParallelIterator}; use wasm_common::entity::{EntityRef, PrimaryMap, SecondaryMap}; use wasm_common::Features; -use wasm_common::{FuncIndex, FuncType, LocalFuncIndex, MemoryIndex, TableIndex}; +use wasm_common::{FuncIndex, FunctionType, LocalFuncIndex, MemoryIndex, TableIndex}; use wasmer_compiler::{ Compilation, CompileError, CompiledFunction, Compiler, CompilerConfig, CustomSection, CustomSectionProtection, FunctionBody, FunctionBodyData, ModuleTranslationState, Relocation, @@ -141,7 +141,7 @@ impl Compiler for LLVMCompiler { fn compile_wasm_trampolines( &self, - signatures: &[FuncType], + signatures: &[FunctionType], ) -> Result, CompileError> { signatures .par_iter() diff --git a/lib/compiler-llvm/src/trampoline/wasm.rs b/lib/compiler-llvm/src/trampoline/wasm.rs index a956f7bac..f71de8f2f 100644 --- a/lib/compiler-llvm/src/trampoline/wasm.rs +++ b/lib/compiler-llvm/src/trampoline/wasm.rs @@ -4,7 +4,7 @@ use inkwell::{ context::Context, module::Linkage, passes::PassManager, targets::FileType, types::BasicType, values::FunctionValue, AddressSpace, }; -use wasm_common::{FuncType, Type}; +use wasm_common::{FunctionType, Type}; use wasmer_compiler::{CompileError, CompiledFunctionUnwindInfo, FunctionBody}; pub struct FuncTrampoline { @@ -20,7 +20,7 @@ impl FuncTrampoline { pub fn trampoline( &mut self, - ty: &FuncType, + ty: &FunctionType, config: &LLVMConfig, ) -> Result { let mut module = self.ctx.create_module(""); @@ -104,7 +104,7 @@ impl FuncTrampoline { fn generate_trampoline<'ctx>( trampoline_func: FunctionValue, - func_sig: &FuncType, + func_sig: &FunctionType, context: &'ctx Context, intrinsics: &Intrinsics<'ctx>, ) -> Result<(), CompileError> { diff --git a/lib/compiler-llvm/src/translator/code.rs b/lib/compiler-llvm/src/translator/code.rs index e99fc9aab..febc4e164 100644 --- a/lib/compiler-llvm/src/translator/code.rs +++ b/lib/compiler-llvm/src/translator/code.rs @@ -33,7 +33,8 @@ use std::collections::HashMap; use crate::config::LLVMConfig; use wasm_common::entity::{EntityRef, PrimaryMap, SecondaryMap}; use wasm_common::{ - FuncIndex, FuncType, GlobalIndex, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex, Type, + FuncIndex, FunctionType, GlobalIndex, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex, + Type, }; use wasmer_compiler::wasmparser::{self, BinaryReader, MemoryImmediate, Operator}; use wasmer_compiler::{ diff --git a/lib/compiler-llvm/src/translator/intrinsics.rs b/lib/compiler-llvm/src/translator/intrinsics.rs index 13c32e4ca..2faaf16af 100644 --- a/lib/compiler-llvm/src/translator/intrinsics.rs +++ b/lib/compiler-llvm/src/translator/intrinsics.rs @@ -34,8 +34,8 @@ use wasmer_runtime_core::{ */ use wasm_common::entity::{EntityRef, PrimaryMap}; use wasm_common::{ - FuncIndex, FuncType, GlobalIndex, MemoryIndex, Mutability, Pages, SignatureIndex, TableIndex, - Type, + FuncIndex, FunctionType as FuncType, GlobalIndex, MemoryIndex, Mutability, Pages, + SignatureIndex, TableIndex, Type, }; use wasmer_runtime::Module as WasmerCompilerModule; use wasmer_runtime::{MemoryPlan, MemoryStyle, VMOffsets}; diff --git a/lib/compiler-singlepass/src/compiler.rs b/lib/compiler-singlepass/src/compiler.rs index 6c7151146..d0e332779 100644 --- a/lib/compiler-singlepass/src/compiler.rs +++ b/lib/compiler-singlepass/src/compiler.rs @@ -6,7 +6,7 @@ use crate::config::SinglepassConfig; use rayon::prelude::{IntoParallelRefIterator, ParallelIterator}; use wasm_common::entity::{EntityRef, PrimaryMap}; use wasm_common::Features; -use wasm_common::{FuncIndex, FuncType, LocalFuncIndex, MemoryIndex, TableIndex}; +use wasm_common::{FuncIndex, FunctionType, LocalFuncIndex, MemoryIndex, TableIndex}; use wasmer_compiler::FunctionBodyData; use wasmer_compiler::TrapInformation; use wasmer_compiler::{Compilation, CompileError, Compiler, FunctionBody}; @@ -67,7 +67,7 @@ impl Compiler for SinglepassCompiler { fn compile_wasm_trampolines( &self, - _signatures: &[FuncType], + _signatures: &[FunctionType], ) -> Result, CompileError> { // Note: do not implement this yet Err(CompileError::Codegen( diff --git a/lib/compiler/src/compiler.rs b/lib/compiler/src/compiler.rs index e34e3ae84..f657d3331 100644 --- a/lib/compiler/src/compiler.rs +++ b/lib/compiler/src/compiler.rs @@ -9,7 +9,7 @@ use crate::target::Target; use crate::FunctionBodyData; use crate::ModuleTranslationState; use wasm_common::entity::PrimaryMap; -use wasm_common::{Features, FuncType, LocalFuncIndex, MemoryIndex, TableIndex}; +use wasm_common::{Features, FunctionType, LocalFuncIndex, MemoryIndex, TableIndex}; use wasmer_runtime::Module; use wasmer_runtime::{MemoryPlan, TablePlan}; use wasmparser::{validate, OperatorValidatorConfig, ValidatingParserConfig}; @@ -82,6 +82,6 @@ pub trait Compiler { /// ``` fn compile_wasm_trampolines( &self, - signatures: &[FuncType], + signatures: &[FunctionType], ) -> Result, CompileError>; } diff --git a/lib/compiler/src/translator/environ.rs b/lib/compiler/src/translator/environ.rs index 8f94d4063..20ec0ff83 100644 --- a/lib/compiler/src/translator/environ.rs +++ b/lib/compiler/src/translator/environ.rs @@ -7,7 +7,7 @@ use crate::{WasmError, WasmResult}; use std::convert::TryFrom; use std::sync::Arc; use wasm_common::entity::PrimaryMap; -use wasm_common::FuncType; +use wasm_common::FunctionType; use wasm_common::{ DataIndex, DataInitializer, DataInitializerLocation, ElemIndex, ExportIndex, FuncIndex, GlobalIndex, GlobalInit, GlobalType, ImportIndex, LocalFuncIndex, MemoryIndex, MemoryType, @@ -102,7 +102,7 @@ impl<'data> ModuleEnvironment<'data> { Ok(()) } - pub(crate) fn declare_signature(&mut self, sig: FuncType) -> WasmResult<()> { + pub(crate) fn declare_signature(&mut self, sig: FunctionType) -> WasmResult<()> { // TODO: Deduplicate signatures. self.result.module.signatures.push(sig); Ok(()) diff --git a/lib/compiler/src/translator/sections.rs b/lib/compiler/src/translator/sections.rs index d3d9776d3..a273cdf01 100644 --- a/lib/compiler/src/translator/sections.rs +++ b/lib/compiler/src/translator/sections.rs @@ -18,15 +18,16 @@ use std::vec::Vec; use wasm_common::entity::packed_option::ReservedValue; use wasm_common::entity::EntityRef; use wasm_common::{ - DataIndex, ElemIndex, FuncIndex, FuncType, GlobalIndex, GlobalInit, GlobalType, MemoryIndex, - MemoryType, Pages, SignatureIndex, TableIndex, TableType, Type, V128, + DataIndex, ElemIndex, FuncIndex, FunctionType, GlobalIndex, GlobalInit, GlobalType, + MemoryIndex, MemoryType, Pages, SignatureIndex, TableIndex, TableType, Type, V128, }; use wasmparser::{ self, CodeSectionReader, Data, DataKind, DataSectionReader, Element, ElementItem, ElementItems, ElementKind, ElementSectionReader, Export, ExportSectionReader, ExternalKind, - FuncType as WPFuncType, FunctionSectionReader, GlobalSectionReader, GlobalType as WPGlobalType, - ImportSectionEntryType, ImportSectionReader, MemorySectionReader, MemoryType as WPMemoryType, - NameSectionReader, Naming, NamingReader, Operator, TableSectionReader, TypeSectionReader, + FuncType as WPFunctionType, FunctionSectionReader, GlobalSectionReader, + GlobalType as WPGlobalType, ImportSectionEntryType, ImportSectionReader, MemorySectionReader, + MemoryType as WPMemoryType, NameSectionReader, Naming, NamingReader, Operator, + TableSectionReader, TypeSectionReader, }; /// Helper function translating wasmparser types to Wasm Type. @@ -57,7 +58,7 @@ pub fn parse_type_section( for entry in types { match entry.map_err(to_wasm_error)? { - WPFuncType { + WPFunctionType { form: wasmparser::Type::Func, params, returns, @@ -76,7 +77,7 @@ pub fn parse_type_section( .expect("only numeric types are supported in function signatures") }) .collect(); - let sig = FuncType::new(sig_params, sig_returns); + let sig = FunctionType::new(sig_params, sig_returns); environ.declare_signature(sig)?; module_translation_state.wasm_types.push((params, returns)); } diff --git a/lib/jit/src/engine.rs b/lib/jit/src/engine.rs index db82091fa..a51b4efb8 100644 --- a/lib/jit/src/engine.rs +++ b/lib/jit/src/engine.rs @@ -9,7 +9,7 @@ use std::cell::RefCell; use std::collections::HashMap; use std::sync::Arc; use wasm_common::entity::PrimaryMap; -use wasm_common::{FuncType, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex}; +use wasm_common::{FunctionType, LocalFuncIndex, MemoryIndex, SignatureIndex, TableIndex}; use wasmer_compiler::{Compilation, CompileError, FunctionBody, Target}; #[cfg(feature = "compiler")] use wasmer_compiler::{Compiler, CompilerConfig}; @@ -92,13 +92,13 @@ impl JITEngine { } /// Register a signature - pub fn register_signature(&self, func_type: &FuncType) -> VMSharedSignatureIndex { + pub fn register_signature(&self, func_type: &FunctionType) -> VMSharedSignatureIndex { let compiler = self.compiler(); compiler.signatures().register(func_type) } /// Lookup a signature - pub fn lookup_signature(&self, sig: VMSharedSignatureIndex) -> Option { + pub fn lookup_signature(&self, sig: VMSharedSignatureIndex) -> Option { let compiler = self.compiler(); compiler.signatures().lookup(sig) } diff --git a/lib/runtime/src/module.rs b/lib/runtime/src/module.rs index bf93da633..58f82791f 100644 --- a/lib/runtime/src/module.rs +++ b/lib/runtime/src/module.rs @@ -9,8 +9,8 @@ use std::sync::atomic::{AtomicUsize, Ordering::SeqCst}; use std::sync::Arc; use wasm_common::entity::{EntityRef, PrimaryMap}; use wasm_common::{ - DataIndex, ElemIndex, ExportIndex, ExportType, ExternType, FuncIndex, FuncType, GlobalIndex, - GlobalInit, GlobalType, ImportIndex, ImportType, LocalFuncIndex, LocalGlobalIndex, + DataIndex, ElemIndex, ExportIndex, ExportType, ExternType, FuncIndex, FunctionType, + GlobalIndex, GlobalInit, GlobalType, ImportIndex, ImportType, LocalFuncIndex, LocalGlobalIndex, LocalMemoryIndex, LocalTableIndex, MemoryIndex, MemoryType, Pages, SignatureIndex, TableIndex, TableType, }; @@ -132,7 +132,7 @@ pub struct Module { pub func_names: HashMap, /// WebAssembly function signatures. - pub signatures: PrimaryMap, + pub signatures: PrimaryMap, /// Types of functions (imported and local). pub functions: PrimaryMap, @@ -191,7 +191,7 @@ impl Module { } /// Get the exported signatures of the module - pub fn exported_signatures(&self) -> Vec { + pub fn exported_signatures(&self) -> Vec { self.exports .iter() .filter_map(|(_name, export_index)| match export_index { @@ -202,7 +202,7 @@ impl Module { } _ => None, }) - .collect::>() + .collect::>() } /// Get the export types of the module diff --git a/lib/runtime/src/sig_registry.rs b/lib/runtime/src/sig_registry.rs index 2d1d3baee..e20ac8dad 100644 --- a/lib/runtime/src/sig_registry.rs +++ b/lib/runtime/src/sig_registry.rs @@ -6,7 +6,7 @@ use more_asserts::{assert_lt, debug_assert_lt}; use std::collections::{hash_map, HashMap}; use std::convert::TryFrom; use std::sync::RwLock; -use wasm_common::FuncType; +use wasm_common::FunctionType; /// WebAssembly requires that the caller and callee signatures in an indirect /// call must match. To implement this efficiently, keep a registry of all @@ -24,8 +24,8 @@ pub struct SignatureRegistry { #[derive(Debug, Default)] struct Inner { - signature2index: HashMap, - index2signature: HashMap, + signature2index: HashMap, + index2signature: HashMap, } impl SignatureRegistry { @@ -37,7 +37,7 @@ impl SignatureRegistry { } /// Register a signature and return its unique index. - pub fn register(&self, sig: &FuncType) -> VMSharedSignatureIndex { + pub fn register(&self, sig: &FunctionType) -> VMSharedSignatureIndex { let mut inner = self.inner.write().unwrap(); let len = inner.signature2index.len(); match inner.signature2index.entry(sig.clone()) { @@ -62,7 +62,7 @@ impl SignatureRegistry { /// /// Note that for this operation to be semantically correct the `idx` must /// have previously come from a call to `register` of this same object. - pub fn lookup(&self, idx: VMSharedSignatureIndex) -> Option { + pub fn lookup(&self, idx: VMSharedSignatureIndex) -> Option { self.inner .read() .unwrap() diff --git a/lib/wasm-common/src/lib.rs b/lib/wasm-common/src/lib.rs index 1c660aa8f..77bb8b315 100644 --- a/lib/wasm-common/src/lib.rs +++ b/lib/wasm-common/src/lib.rs @@ -51,8 +51,8 @@ pub use crate::r#ref::{AnyRef, HostInfo, HostRef}; pub use crate::units::{Bytes, Pages}; pub use crate::values::Value; pub use types::{ - ExportType, ExternType, FuncType, GlobalInit, GlobalType, ImportType, MemoryType, Mutability, - TableType, Type, V128, + ExportType, ExternType, FunctionType, GlobalInit, GlobalType, ImportType, MemoryType, + Mutability, TableType, Type, V128, }; /// Version number of this crate. diff --git a/lib/wasm-common/src/native.rs b/lib/wasm-common/src/native.rs index 325057033..f95aebb21 100644 --- a/lib/wasm-common/src/native.rs +++ b/lib/wasm-common/src/native.rs @@ -1,7 +1,7 @@ //! This module permits to create native functions //! easily in Rust, thanks to it's advanced typing system. -use crate::types::{FuncType, Type}; +use crate::types::{FunctionType, Type}; use std::convert::Infallible; use std::marker::PhantomData; @@ -300,8 +300,8 @@ where } /// Get the type of the Func - pub fn ty(&self) -> FuncType { - FuncType::new(Args::wasm_types(), Rets::wasm_types()) + pub fn ty(&self) -> FunctionType { + FunctionType::new(Args::wasm_types(), Rets::wasm_types()) } /// Get the type of the Func @@ -633,30 +633,30 @@ mod test_func { #[test] fn test_function_types() { - assert_eq!(Func::new(func).ty(), FuncType::new(vec![], vec![])); + assert_eq!(Func::new(func).ty(), FunctionType::new(vec![], vec![])); assert_eq!( Func::new(func__i32).ty(), - FuncType::new(vec![], vec![Type::I32]) + FunctionType::new(vec![], vec![Type::I32]) ); assert_eq!( Func::new(func_i32).ty(), - FuncType::new(vec![Type::I32], vec![]) + FunctionType::new(vec![Type::I32], vec![]) ); assert_eq!( Func::new(func_i32__i32).ty(), - FuncType::new(vec![Type::I32], vec![Type::I32]) + FunctionType::new(vec![Type::I32], vec![Type::I32]) ); assert_eq!( Func::new(func_i32_i32__i32).ty(), - FuncType::new(vec![Type::I32, Type::I32], vec![Type::I32]) + FunctionType::new(vec![Type::I32, Type::I32], vec![Type::I32]) ); assert_eq!( Func::new(func_i32_i32__i32_i32).ty(), - FuncType::new(vec![Type::I32, Type::I32], vec![Type::I32, Type::I32]) + FunctionType::new(vec![Type::I32, Type::I32], vec![Type::I32, Type::I32]) ); assert_eq!( Func::new(func_f32_i32__i32_f32).ty(), - FuncType::new(vec![Type::F32, Type::I32], vec![Type::I32, Type::F32]) + FunctionType::new(vec![Type::F32, Type::I32], vec![Type::I32, Type::F32]) ); } diff --git a/lib/wasm-common/src/types.rs b/lib/wasm-common/src/types.rs index b999eb9b8..2133a3d49 100644 --- a/lib/wasm-common/src/types.rs +++ b/lib/wasm-common/src/types.rs @@ -100,7 +100,7 @@ impl From<&[u8]> for V128 { #[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))] pub enum ExternType { /// This external type is the type of a WebAssembly function. - Func(FuncType), + Func(FunctionType), /// This external type is the type of a WebAssembly global. Global(GlobalType), /// This external type is the type of a WebAssembly table. @@ -192,7 +192,7 @@ macro_rules! accessors { impl ExternType { accessors! { - (Func(FuncType) func unwrap_func) + (Func(FunctionType) func unwrap_func) (Global(GlobalType) global unwrap_global) (Table(TableType) table unwrap_table) (Memory(MemoryType) memory unwrap_memory) @@ -216,14 +216,14 @@ impl ExternType { /// WebAssembly functions can have 0 or more parameters and results. #[derive(Debug, Clone, PartialEq, Eq, Hash)] #[cfg_attr(feature = "enable-serde", derive(Serialize, Deserialize))] -pub struct FuncType { +pub struct FunctionType { /// The parameters of the function params: Vec, /// The return values of the function results: Vec, } -impl FuncType { +impl FunctionType { /// Creates a new Function Type with the given parameter and return types. pub fn new(params: Params, returns: Returns) -> Self where @@ -257,7 +257,7 @@ impl FuncType { // } } -impl std::fmt::Display for FuncType { +impl std::fmt::Display for FunctionType { fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { let params = self .params