Stage arena is not a sub
This commit is contained in:
@@ -242,8 +242,8 @@ parse_init(Parse_Ctx *ctx, Allocator *perm_allocator, Allocator *heap_allocator)
|
||||
ctx->ordered_decls = {ctx->heap};
|
||||
ctx->type_map = {ctx->heap};
|
||||
ctx->modules = {ctx->heap};
|
||||
ctx->stage_arena = arena_sub(perm_allocator, mib(4), "Compiler stage arena"_s);
|
||||
bigint_allocator = ctx->perm;
|
||||
arena_init(&ctx->stage_arena, "Compiler stage arena"_s);
|
||||
|
||||
lex_init(ctx->perm, ctx->heap, ctx);
|
||||
ctx->builtins = ast_module(ctx->intern("builtins"_s));
|
||||
|
||||
4
main.cpp
4
main.cpp
@@ -176,10 +176,14 @@ int main(int argument_count, char **arguments){
|
||||
|
||||
F64 total_time = os_time();
|
||||
begin_compilation();
|
||||
|
||||
Ast_Module *module = add_module(pctx->intern(program_name));
|
||||
parse_all_modules();
|
||||
assert(module);
|
||||
resolve_everything_in_module(module);
|
||||
|
||||
|
||||
arena_clear(&pctx->stage_arena);
|
||||
String result = get_compilation_result();
|
||||
assert(os_write_file("program.c"_s, result));
|
||||
{
|
||||
|
||||
@@ -69,9 +69,6 @@ WinMain :: (hInstance: HINSTANCE, hPrevInstance: HINSTANCE, lpCmdLine: LPSTR, nS
|
||||
}
|
||||
assert(RegisterClassW(&w) != 0)
|
||||
|
||||
buff: *char = allocate(100)
|
||||
thing: int = buff
|
||||
|
||||
screen_size: Vec2I = {1280, 720}
|
||||
window := CreateWindowExW(
|
||||
dwExStyle = 0, hWndParent = 0, hMenu = 0, lpParam = 0,
|
||||
|
||||
Reference in New Issue
Block a user