Integrated the garbage collector.

This commit is contained in:
Samuel Hammersberg 2023-03-30 12:31:03 +02:00
parent bbe0d77a19
commit b3525db7fd
5 changed files with 21 additions and 12 deletions

View file

@ -225,7 +225,7 @@ llvmIrToString = go 0
(Alloca t) -> unwords ["alloca", toIr t, "\n"]
(Malloca t) ->
concat
[ "call ptr @malloc(i32 ", show t, ")\n"]
[ "call ptr @cheap_alloc(i64 ", show t, ")\n"]
(Store t1 val t2 (Ident id2)) ->
concat
[ "store ", toIr t1, " ", toIr val