mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
Boxed skeleton
This commit is contained in:
parent
7be0349eee
commit
09f01ba193
8 changed files with 31 additions and 1 deletions
|
@ -45,6 +45,7 @@ fn build_hash_layout<'a, 'ctx, 'env>(
|
|||
when_recursive: WhenRecursive<'a>,
|
||||
) -> IntValue<'ctx> {
|
||||
match layout {
|
||||
Layout::Boxed(_) => todo!(),
|
||||
Layout::Builtin(builtin) => {
|
||||
hash_builtin(env, layout_ids, seed, val, layout, builtin, when_recursive)
|
||||
}
|
||||
|
|
|
@ -139,6 +139,7 @@ fn build_eq<'a, 'ctx, 'env>(
|
|||
}
|
||||
|
||||
match lhs_layout {
|
||||
Layout::Boxed(_) => todo!(),
|
||||
Layout::Builtin(builtin) => {
|
||||
build_eq_builtin(env, layout_ids, lhs_val, rhs_val, builtin, when_recursive)
|
||||
}
|
||||
|
@ -296,6 +297,7 @@ fn build_neq<'a, 'ctx, 'env>(
|
|||
}
|
||||
|
||||
match lhs_layout {
|
||||
Layout::Boxed(_) => todo!(),
|
||||
Layout::Builtin(builtin) => {
|
||||
build_neq_builtin(env, layout_ids, lhs_val, rhs_val, builtin, when_recursive)
|
||||
}
|
||||
|
|
|
@ -79,6 +79,14 @@ pub fn basic_type_from_layout<'a, 'ctx, 'env>(
|
|||
.as_basic_type_enum()
|
||||
}
|
||||
|
||||
Boxed(_) => {
|
||||
// TODO make this dynamic
|
||||
env.context
|
||||
.i64_type()
|
||||
.ptr_type(AddressSpace::Generic)
|
||||
.as_basic_type_enum()
|
||||
}
|
||||
|
||||
Builtin(builtin) => basic_type_from_builtin(env, builtin),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -752,6 +752,10 @@ fn modify_refcount_layout_build_function<'a, 'ctx, 'env>(
|
|||
Some(function)
|
||||
}
|
||||
},
|
||||
Layout::Boxed(_) => {
|
||||
// TODO
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue