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
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@ impl Function {
}
}

let is_unconstrained = matches!(self.runtime(), RuntimeType::Brillig(_)).into();
let is_within_unconstrained = self.dfg.make_constant(is_unconstrained, NumericType::bool());
for instruction_id in is_unconstrained_calls {
let call_returns = self.dfg.instruction_results(instruction_id);
let original_return_id = call_returns[0];

// We replace the result with a fresh id. This will be unused, so the DIE pass will remove the leftover intrinsic call.
self.dfg.replace_result(instruction_id, original_return_id);

let is_unconstrained = matches!(self.runtime(), RuntimeType::Brillig(_)).into();
let is_within_unconstrained =
self.dfg.make_constant(is_unconstrained, NumericType::bool());
// Replace all uses of the original return value with the constant
self.dfg.set_value_from_id(original_return_id, is_within_unconstrained);
}
Expand Down