MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / Function

Class Function

crates/environ/src/fact.rs:947–971  ·  view source on GitHub ↗

A generated function to be added to an adapter module. At least one function is created per-adapter and depending on the type hierarchy multiple functions may be generated per-adapter.

Source from the content-addressed store, hash-verified

945/// At least one function is created per-adapter and depending on the type
946/// hierarchy multiple functions may be generated per-adapter.
947struct Function {
948 /// Whether or not the `body` has been finished.
949 ///
950 /// Functions are added to a `Module` before they're defined so this is used
951 /// to assert that the function was in fact actually filled in by the
952 /// time we reach `Module::encode`.
953 filled_in: bool,
954
955 /// The type signature that this function has, as an index into the core
956 /// wasm type index space of the generated adapter module.
957 ty: u32,
958
959 /// The locals that are used by this function, organized by the number of
960 /// types of each local.
961 locals: Vec<(u32, ValType)>,
962
963 /// If specified, the export name of this function.
964 export: Option<String>,
965
966 /// The contents of the function.
967 ///
968 /// See `Body` for more information, and the `Vec` here represents the
969 /// concatenation of all the `Body` fragments.
970 body: Vec<Body>,
971}
972
973/// Representation of a fragment of the body of a core wasm function generated
974/// for adapters.

Callers 12

type_ofMethod · 0.70
fromMethod · 0.70
import_funcMethod · 0.70
import_prepare_callMethod · 0.70
from_subprogram_dieMethod · 0.50
entity_typeMethod · 0.50
tyMethod · 0.50
translate_payloadMethod · 0.50
push_typeMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected