mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
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:
@@ -28,7 +28,7 @@ fn void ArenaAllocator.clear(&self)
|
||||
struct ArenaAllocatorHeader @local
|
||||
{
|
||||
usz size;
|
||||
char[*] data;
|
||||
char[?] data;
|
||||
}
|
||||
|
||||
<*
|
||||
|
||||
@@ -52,7 +52,7 @@ fn void OnStackAllocator.free(&self)
|
||||
struct OnStackAllocatorHeader
|
||||
{
|
||||
usz size;
|
||||
char[*] data;
|
||||
char[?] data;
|
||||
}
|
||||
|
||||
<*
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user