Setup for specializing equality checks

This commit is contained in:
Brian Carroll 2021-12-13 17:18:57 +00:00
parent ee97eb668d
commit cd91be678f
3 changed files with 77 additions and 28 deletions

View file

@ -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.