Fix compare for big structs

This commit is contained in:
Ayaz Hafiz 2023-06-13 14:28:17 -05:00
parent 5c1a601074
commit 879a97ee4c
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
4 changed files with 94 additions and 69 deletions

View file

@ -153,6 +153,7 @@ pub fn argument_type_from_layout<'a, 'ctx>(
) -> BasicTypeEnum<'ctx> {
use LayoutRepr::*;
// TODO: can this just be "basic_type_from_layout => ptr if passed_by_ref"?
match layout_interner.get_repr(layout) {
LambdaSet(lambda_set) => {
argument_type_from_layout(env, layout_interner, lambda_set.runtime_representation())
@ -167,6 +168,7 @@ pub fn argument_type_from_layout<'a, 'ctx>(
base
}
}
Struct(_) => argument_type_from_struct_layout(env, layout_interner, layout),
_ => basic_type_from_layout(env, layout_interner, layout),
}
}