Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.

This commit is contained in:
Christoffer Lerno
2025-01-25 22:10:12 +01:00
parent ca91ad4097
commit e40bab2d30
93 changed files with 529 additions and 466 deletions

View File

@@ -28,7 +28,7 @@ fn void ArenaAllocator.clear(&self)
struct ArenaAllocatorHeader @local
{
usz size;
char[*] data;
char[?] data;
}
<*

View File

@@ -52,7 +52,7 @@ fn void OnStackAllocator.free(&self)
struct OnStackAllocatorHeader
{
usz size;
char[*] data;
char[?] data;
}
<*

View File

@@ -4,7 +4,7 @@ import std::io, std::math;
struct TempAllocatorChunk @local
{
usz size;
char[*] data;
char[?] data;
}
struct TempAllocator (Allocator)
@@ -13,7 +13,7 @@ struct TempAllocator (Allocator)
TempAllocatorPage* last_page;
usz used;
usz capacity;
char[*] data;
char[?] data;
}
const usz PAGE_IS_ALIGNED @private = (usz)isz.max + 1u;
@@ -26,7 +26,7 @@ struct TempAllocatorPage
usz mark;
usz size;
usz ident;
char[*] data;
char[?] data;
}
macro usz TempAllocatorPage.pagesize(&self) => self.size & ~PAGE_IS_ALIGNED;