pub fn lower_functions_with_metadata<I, Ty, V, Info, C>(
functions: Vec<ParsedFunction<I, Ty>>,
metadata: &ProgramMetadata<V, Ty, Info>,
context: &mut C,
) -> Result<Vec<I::Runtime>>where
Ty: PartialEq,
I: Lower<C>,
C: FunctionScope,Expand description
Validate supplied metadata and lower function bodies without consuming it.
Available with program-image-execution. The caller prepares the metadata
and context independently, for example by processing individual header
declarations. The context may borrow prepared configuration or the metadata
itself; neither is moved or cloned by this function.
Function declarations and table bounds are validated before lowering starts.
lower_functions prepares label scopes and preserves instruction error
context. The returned code can be assembled with
ProgramMetadata::into_module, which also checks standard value references.
ยงErrors
Returns declaration, table, or instruction-lowering errors. No partial code is returned; earlier context mutations are not rolled back.