From e440ca528f753b96e49a3dd9b0e5902aa983750c Mon Sep 17 00:00:00 2001 From: Esteve Soler Arderiu Date: Wed, 27 Nov 2024 16:10:05 +0100 Subject: [PATCH] Fix bugs. --- src/libfuncs/array.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/libfuncs/array.rs b/src/libfuncs/array.rs index 45a97ef97..665a6e8bc 100644 --- a/src/libfuncs/array.rs +++ b/src/libfuncs/array.rs @@ -1607,9 +1607,6 @@ pub fn build_slice<'ctx, 'this>( )); { - // TODO: If shared -> Clone and drop. - // TODO: If not shared -> Move and manually free (same as in array_get but with different offsets). - let (elem_ty, elem_layout) = registry.build_type_with_layout(context, helper, registry, metadata, &info.ty)?; let elem_stride = @@ -1675,6 +1672,7 @@ pub fn build_slice<'ctx, 'this>( match metadata.get::() { Some(dup_overrides_meta) if dup_overrides_meta.is_overriden(&info.ty) => { + let k0 = valid_block.const_int(context, location, 0, 64)?; valid_block.append_operation(scf::r#for( k0, slice_size,