Add FunctionPointer layout

This commit is contained in:
Ayaz Hafiz 2023-06-25 15:35:03 -05:00
parent a9e3f967a8
commit 6312d75ee0
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
18 changed files with 111 additions and 14 deletions

View file

@ -537,7 +537,7 @@ fn jit_to_ast_help<'a, A: ReplApp<'a>>(
LayoutRepr::Ptr(_) => {
unreachable!("Ptr will never be visible to users")
}
LayoutRepr::LambdaSet(_) => OPAQUE_FUNCTION,
LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_) => OPAQUE_FUNCTION,
};
apply_newtypes(env, newtype_containers.into_bump_slice(), expr)
@ -575,7 +575,7 @@ fn addr_to_ast<'a, M: ReplAppMemory>(
let raw_content = env.subs.get_content_without_compacting(raw_var);
let expr = match (raw_content, layout) {
(Content::Structure(FlatType::Func(_, _, _)), _) | (_, LayoutRepr::LambdaSet(_)) => {
(Content::Structure(FlatType::Func(_, _, _)), _) | (_, LayoutRepr::LambdaSet(_) | LayoutRepr::FunctionPointer(_)) => {
OPAQUE_FUNCTION
}
(_, LayoutRepr::Builtin(Builtin::Bool)) => {