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::HashMap, hash::BuildHasherDefault};
use bumpalo::collections::{CollectIn, Vec};
use bumpalo::Bump;
use roc_collections::{all::WyHash, MutMap, MutSet};
use roc_error_macros::internal_error;
use roc_error_macros::{internal_error, todo_lambda_erasure};
use roc_module::low_level::LowLevel;
use roc_module::{low_level::LowLevelWrapperType, symbol::Symbol};
@ -942,6 +942,9 @@ fn insert_refcount_operations_binding<'a>(
inc_owned!(arguments.iter().copied(), new_let)
}
CallType::ByPointer { .. } => {
todo_lambda_erasure!()
}
CallType::Foreign { .. } => {
// Foreign functions should be responsible for their own memory management.
// But previously they were assumed to be called with borrowed parameters, so we do the same now.