Remove insert_direct_no_semantic in compare eq

This commit is contained in:
Ayaz Hafiz 2023-06-16 22:11:41 -05:00
parent 7ab044d79f
commit 6139918e3b
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
7 changed files with 89 additions and 118 deletions

View file

@ -78,17 +78,16 @@ impl<'ctx> RocStruct<'ctx> {
&self,
env: &Env<'a, 'ctx, '_>,
layout_interner: &STLayoutInterner<'a>,
struct_layout: InLayout<'a>,
struct_layout: LayoutRepr<'a>,
index: u64,
) -> BasicValueEnum<'ctx> {
let layout =
if let LayoutRepr::LambdaSet(lambda_set) = layout_interner.get_repr(struct_layout) {
lambda_set.runtime_representation()
} else {
struct_layout
};
let layout = if let LayoutRepr::LambdaSet(lambda_set) = struct_layout {
layout_interner.get_repr(lambda_set.runtime_representation())
} else {
struct_layout
};
match (self, layout_interner.get_repr(layout)) {
match (self, layout) {
(Self::ByValue(argument), LayoutRepr::Struct(field_layouts)) => {
index_struct_value(env, layout_interner, field_layouts, *argument, index)
}