From 7a08d1d235f85b68457808697e63c0fbaaa0cee1 Mon Sep 17 00:00:00 2001 From: sirasistant Date: Tue, 28 Nov 2023 17:11:16 +0000 Subject: [PATCH] fix: always codegen inc_rc --- compiler/noirc_evaluator/src/ssa/function_builder/mod.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs b/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs index 5b8ef2ea7bd..144e37a3f31 100644 --- a/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs +++ b/compiler/noirc_evaluator/src/ssa/function_builder/mod.rs @@ -462,11 +462,6 @@ impl FunctionBuilder { /// within the given value. If the given value is not an array and does not contain /// any arrays, this does nothing. pub(crate) fn increment_array_reference_count(&mut self, value: ValueId) { - // Reference-counted arrays are only needed for Brillig's copy on write optimization. - if self.current_function.runtime() != RuntimeType::Brillig { - return; - } - match self.type_of_value(value) { Type::Numeric(_) => (), Type::Function => (),