diff options
Diffstat (limited to 'src/compiler.c')
-rw-r--r-- | src/compiler.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler.c b/src/compiler.c index 30a583a..bdcb1c8 100644 --- a/src/compiler.c +++ b/src/compiler.c @@ -40,7 +40,7 @@ static CHECK_RESULT int create_default_type(amal_compiler *compiler, const char return_if_error(structdecl_init(struct_decl, &compiler->root_scope, &compiler->allocator)); return_if_error(scoped_allocator_alloc(&compiler->allocator, sizeof(LhsExpr), (void**)lhs_expr)); - return_if_error(lhsexpr_init(*lhs_expr, bool_true, bool_true, + return_if_error(lhsexpr_init(*lhs_expr, bool_true, bool_true, bool_true, create_buffer_view(name, strnlen(name, PATH_MAX)), &compiler->allocator)); return_if_error(ast_create(&compiler->allocator, struct_decl, AST_STRUCT_DECL, &(*lhs_expr)->rhs_expr)); @@ -242,6 +242,7 @@ static CHECK_RESULT int thread_generate_ssa(Parser *parser) { return_if_error(scoped_allocator_alloc(parser->allocator, sizeof(Ssa), (void**)&compiler_context.ssa)); return_if_error(ssa_init(compiler_context.ssa, parser->allocator)); + compiler_context.compiler = parser->compiler; parser->ssa = compiler_context.ssa; amal_log_debug("Generating SSA for file: %.*s", parser->tokenizer.code_name.size, parser->tokenizer.code_name.data); result = setjmp(compiler_context.env); |