Try an alloca approach for structs

This commit is contained in:
Richard Feldman 2020-03-10 02:26:07 -04:00
parent 3789402a32
commit 8450597a07
7 changed files with 153 additions and 42 deletions

View file

@ -434,13 +434,13 @@ pub fn types() -> MutMap<Symbol, (SolvedType, Region)> {
// isEmpty : Attr u (List *) -> Attr v Bool
add_type(
Symbol::LIST_ISEMPTY,
Symbol::LIST_IS_EMPTY,
unique_function(vec![list_type(UVAR1, TVAR1)], bool_type(UVAR2)),
);
// length : List a -> Int
// len : List * -> Int
add_type(
Symbol::LIST_LENGTH,
Symbol::LIST_LEN,
unique_function(vec![list_type(UVAR1, TVAR1)], int_type(UVAR2)),
);