Fix in nested block handling. @maydiscard and @nodiscard annotations. If the common type of int[x] and int[y] is int[]

This commit is contained in:
Christoffer Lerno
2022-07-17 19:23:42 +02:00
committed by Christoffer Lerno
parent 4beb7eff8f
commit 6cf3c9f46b
21 changed files with 787 additions and 612 deletions

View File

@@ -208,14 +208,14 @@ fn void DynamicArenaAllocator.destroy(DynamicArenaAllocator* this)
while (page)
{
DynamicArenaPage* next_page = page.prev_arena;
this.backing_allocator.free(page);
this.backing_allocator.free(page)!!;
page = next_page;
}
page = this.unused_page;
while (page)
{
DynamicArenaPage* next_page = page.prev_arena;
this.backing_allocator.free(page);
this.backing_allocator.free(page)!!;
page = next_page;
}
this.page = null;
@@ -297,7 +297,7 @@ private fn void*! DynamicArenaAllocator.alloc_new(DynamicArenaAllocator* this, u
DynamicArenaPage*! page = this.backing_allocator.alloc(DynamicArenaPage.sizeof);
if (catch err = page)
{
this.backing_allocator.free(mem);
this.backing_allocator.free(mem)?;
return err!;
}
page.memory = mem;