Complete rework, adding packages
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
struct Token;
|
||||
Allocator *bigint_allocator;
|
||||
global S64 bigint_allocation_count;
|
||||
function void parsing_error(Token *token, const char *str, ...);
|
||||
function void compiler_error(Token *token, const char *str, ...);
|
||||
|
||||
#define Set_BigInt_Allocator(x) BigInt_Allocator bigint_allocator(x)
|
||||
struct BigInt_Allocator{
|
||||
@@ -17,7 +17,7 @@ struct BigInt_Allocator{
|
||||
#define count_bigint_alloc() (bigint_allocator != thread_ctx.scratch ? bigint_allocation_count++ : 0)
|
||||
#define malloc_arena(x) (count_bigint_alloc(), exp_alloc(bigint_allocator, x, AF_ZeroMemory))
|
||||
#define ALLOC_DIGITS(_digits) (uint64_t *)((_digits) ? malloc_arena(sizeof(uint64_t) * (_digits)) : NULL)
|
||||
#define FATAL_ERROR(x) parsing_error(0, x)
|
||||
#define FATAL_ERROR(x) compiler_error(0, x)
|
||||
|
||||
struct BigInt
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user