Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions compiler/noirc_evaluator/src/ssa/opt/defunctionalize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -539,14 +539,17 @@ fn function_id_to_field(function_id: FunctionId) -> FieldElement {
/// The [FunctionId] of the new apply function
///
/// # Panics
/// If the `function_ids` argument is empty.
/// If the `function_ids` argument has fewer than two elements, implying that no apply function is necessary.
fn create_apply_function(
ssa: &mut Ssa,
signature: Signature,
caller_runtime: RuntimeType,
function_ids: Vec<(FunctionId, RuntimeType)>,
) -> FunctionId {
assert!(!function_ids.is_empty());
assert!(
function_ids.len() > 1,
"create_apply_function is expected to be called with two or more FunctionIds"
);
// Clone the user-defined globals and the function purities mapping,
// which are shared across all functions.
// We will be borrowing `ssa` mutably so we need to fetch this shared information
Expand Down
Loading