lang: codegen: start implementing lambda generation

This commit is contained in:
2025-04-21 21:11:45 +01:00
parent 8023ea622a
commit f0869b5ba0
6 changed files with 242 additions and 3 deletions

View File

@@ -18,14 +18,14 @@ static enum ivy_status switch_to_immediate_func(
if (!unit->s_immediate) {
struct mie_type *ret_type
= mie_ctx_get_type(gen->c_ctx, MIE_TYPE_VOID);
unit->s_immediate = mie_func_create(
"init", MIE_FUNC_STATIC, ret_type, NULL, 0);
unit->s_immediate = mie_func_create(MIE_FUNC_STATIC, ret_type);
if (!unit->s_immediate) {
return IVY_ERR_NO_MEMORY;
}
mie_module_add_function(gen->c_module, unit->s_immediate);
mie_module_add_function(
gen->c_module, unit->s_immediate, "init");
}
struct mie_block *block = mie_func_get_last_block(unit->s_immediate);