rune::alloc

Function make_closure

Source
pub(crate) fn make_closure<'ob>(
    prototype: &ByteFn,
    closure_vars: &[Gc<ObjectType<'ob>>],
    cx: &'ob Context<'_>,
) -> Result<Gc<&'ob ByteFn>>
Expand description

Convert a function to closure by replacing the first N elements with their closure values.