mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
Setup for specializing equality checks
This commit is contained in:
parent
ee97eb668d
commit
cd91be678f
3 changed files with 77 additions and 28 deletions
|
@ -89,7 +89,7 @@ impl<'a> CodeGenHelp<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Expands a `Refcounting` node to a `Let` node that calls a specialized helper.
|
||||
/// Expand a `Refcounting` node to a `Let` node that calls a specialized helper proc.
|
||||
/// The helper procs themselves are to be generated later with `generate_procs`
|
||||
pub fn expand_refcount_stmt(
|
||||
&mut self,
|
||||
|
@ -224,6 +224,16 @@ impl<'a> CodeGenHelp<'a> {
|
|||
}
|
||||
}
|
||||
|
||||
/// Replace a generic `Lowlevel::Eq` call with a specialized helper proc.
|
||||
/// The helper procs themselves are to be generated later with `generate_procs`
|
||||
pub fn replace_generic_equals(
|
||||
&mut self,
|
||||
_ident_ids: &mut IdentIds,
|
||||
_layout: Layout<'a>,
|
||||
) -> (&'a Expr<'a>, Option<(Symbol, ProcLayout<'a>)>) {
|
||||
todo!()
|
||||
}
|
||||
|
||||
// Check if the specialization is implemented yet. In the long term, this will be deleted.
|
||||
// In the short term, we have to specify in two places what's complete and what's not:
|
||||
// Here and in generate_procs. We use assertions to ensure they match.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue