use roc_ helpers for box loading and storing

This commit is contained in:
Folkert 2022-03-26 13:10:18 +01:00
parent 59a2253b9a
commit 972c5d78d3
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -1138,7 +1138,7 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
layout.alignment_bytes(env.target_info),
);
env.builder.build_store(allocation, value);
store_roc_value(env, *layout, allocation, value);
allocation.into()
}
@ -1148,8 +1148,7 @@ pub fn build_exp_expr<'a, 'ctx, 'env>(
debug_assert!(value.is_pointer_value());
env.builder
.build_load(value.into_pointer_value(), "load_boxed_value")
load_roc_value(env, *layout, value.into_pointer_value(), "load_boxed_value")
}
Reset { symbol, .. } => {