mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
handle lambda set in a couple more cases
This commit is contained in:
parent
751e7fbf1e
commit
b54912b79b
1 changed files with 10 additions and 1 deletions
|
@ -2216,7 +2216,13 @@ impl<
|
|||
}
|
||||
|
||||
fn load_literal(&mut self, sym: &Symbol, layout: &InLayout<'a>, lit: &Literal<'a>) {
|
||||
match (lit, self.layout_interner.get(*layout)) {
|
||||
let layout = self.layout_interner.get(*layout);
|
||||
|
||||
if let Layout::LambdaSet(lambda_set) = layout {
|
||||
return self.load_literal(sym, &lambda_set.runtime_representation(), lit);
|
||||
}
|
||||
|
||||
match (lit, layout) {
|
||||
(
|
||||
Literal::Int(x),
|
||||
Layout::Builtin(Builtin::Int(
|
||||
|
@ -2370,6 +2376,9 @@ impl<
|
|||
CC::GENERAL_RETURN_REGS[0],
|
||||
);
|
||||
}
|
||||
Layout::LambdaSet(lambda_set) => {
|
||||
self.return_symbol(sym, &lambda_set.runtime_representation())
|
||||
}
|
||||
_ => {
|
||||
internal_error!("All primitive values should fit in a single register");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue