Remove Allocator stuff

This commit is contained in:
Krzosa Karol
2022-10-10 10:22:04 +02:00
parent 2f153a7cd3
commit 7aa0ba56b6
14 changed files with 69 additions and 192 deletions

View File

@@ -18,12 +18,12 @@ enum CmpRes
};
#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 malloc_arena(x) (count_bigint_alloc(), arena_push_size(bigint_allocator, x, AF_ZeroMemory))
#define ALLOC_DIGITS(_digits) (uint64_t *)((_digits) ? malloc_arena(sizeof(uint64_t) * (_digits)) : NULL)
#define FATAL_ERROR(x) compiler_error(0, x)
function void compiler_error(Token *token, const char *str, ...);
const char *bigint_to_error_string(Allocator *allocator, const BigInt *bigint, uint64_t base);
const char *bigint_to_error_string(Arena *allocator, const BigInt *bigint, uint64_t base);
void bigint_init_unsigned(BigInt *big_int, uint64_t value);
void bigint_init_signed(BigInt *big_int, int64_t value);
void bigint_init_bigint(BigInt *dest, const BigInt *src);