Skip to content

Commit

Permalink
feat: do not increment reference counts on arrays through references (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Oct 28, 2024
1 parent a4fc6e8 commit 60c770f
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions compiler/noirc_evaluator/src/ssa/function_builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,13 +442,7 @@ impl FunctionBuilder {
match self.type_of_value(value) {
Type::Numeric(_) => (),
Type::Function => (),
Type::Reference(element) => {
if element.contains_an_array() {
let reference = value;
let value = self.insert_load(reference, element.as_ref().clone());
self.update_array_reference_count(value, increment);
}
}
Type::Reference(_) => (),
Type::Array(..) | Type::Slice(..) => {
// If there are nested arrays or slices, we wait until ArrayGet
// is issued to increment the count of that array.
Expand Down

0 comments on commit 60c770f

Please sign in to comment.