From 53a331bc8b2fc33bd2b7e25a23b4128f89ee0b52 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 7 Jun 2019 10:47:47 +0200 Subject: Add assignment, while, extern, function signature type, start on bytecode --- src/compiler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler.c') 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); -- cgit v1.2.3