initial implementation

This commit is contained in:
Folkert 2022-03-08 19:09:42 +01:00
parent b3b3b8790c
commit 92f2927046
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
13 changed files with 313 additions and 2 deletions

View file

@ -33,6 +33,11 @@ pub fn basic_type_from_layout<'a, 'ctx, 'env>(
..
} => basic_type_from_record(env, sorted_fields),
LambdaSet(lambda_set) => basic_type_from_layout(env, &lambda_set.runtime_representation()),
Boxed(inner_layout) => {
let inner_type = basic_type_from_layout_1(env, inner_layout);
inner_type.ptr_type(AddressSpace::Generic).into()
}
Union(union_layout) => {
use UnionLayout::*;
@ -96,6 +101,11 @@ pub fn basic_type_from_layout_1<'a, 'ctx, 'env>(
LambdaSet(lambda_set) => {
basic_type_from_layout_1(env, &lambda_set.runtime_representation())
}
Boxed(inner_layout) => {
let inner_type = basic_type_from_layout_1(env, inner_layout);
inner_type.ptr_type(AddressSpace::Generic).into()
}
Union(union_layout) => {
use UnionLayout::*;