Call erased functions

This commit is contained in:
Ayaz Hafiz 2023-06-25 18:10:51 -05:00
parent 558d7459b4
commit 510a421748
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
10 changed files with 350 additions and 23 deletions

View file

@ -10,7 +10,7 @@ use std::collections::hash_map::Entry;
use bumpalo::{collections::Vec, Bump};
use roc_builtins::bitcode::{self, FloatWidth, IntWidth};
use roc_collections::all::{MutMap, MutSet};
use roc_error_macros::internal_error;
use roc_error_macros::{internal_error, todo_lambda_erasure};
use roc_module::ident::ModuleName;
use roc_module::low_level::{LowLevel, LowLevelWrapperType};
use roc_module::symbol::{Interns, ModuleId, Symbol};
@ -265,6 +265,7 @@ impl<'a> LastSeenMap<'a> {
match call_type {
CallType::ByName { .. } => {}
CallType::ByPointer { .. } => {}
CallType::LowLevel { .. } => {}
CallType::HigherOrder { .. } => {}
CallType::Foreign { .. } => {}
@ -729,6 +730,10 @@ trait Backend<'a> {
self.build_fn_call(sym, fn_name, arguments, arg_layouts, ret_layout)
}
CallType::ByPointer { .. } => {
todo_lambda_erasure!()
}
CallType::LowLevel { op: lowlevel, .. } => {
let mut arg_layouts: bumpalo::collections::Vec<InLayout<'a>> =
bumpalo::vec![in self.env().arena];