lang: remove references to old mie api

This commit is contained in:
2026-03-16 15:07:57 +00:00
parent c44e976979
commit 016ee11f75
15 changed files with 170 additions and 104 deletions

View File

@@ -105,14 +105,16 @@ static struct code_generator_result gen_int(
debug_printf("codegen: got int\n");
struct ivy_ast_int_node *int_node = (struct ivy_ast_int_node *)node;
#if 0
struct mie_value *value
= mie_ctx_get_int(gen->c_ctx, int_node->n_value->t_int, 32);
enum ivy_status status = push_operand(expr, node, value, NULL);
if (status != IVY_OK) {
return CODEGEN_RESULT_ERR(status);
}
#endif
return CODEGEN_RESULT_OK(0);
return CODEGEN_RESULT_ERR(IVY_ERR_NOT_SUPPORTED);
}
static struct code_generator_result gen_keyword_const(
@@ -123,6 +125,7 @@ static struct code_generator_result gen_keyword_const(
debug_printf("codegen: got keyword const\n");
#if 0
struct mie_value *value = NULL;
switch (node->n_type) {
@@ -144,8 +147,9 @@ static struct code_generator_result gen_keyword_const(
if (status != IVY_OK) {
return CODEGEN_RESULT_ERR(status);
}
#endif
return CODEGEN_RESULT_OK(0);
return CODEGEN_RESULT_ERR(IVY_ERR_NOT_SUPPORTED);
}
static struct code_generator_result gen_string(
@@ -158,6 +162,7 @@ static struct code_generator_result gen_string(
struct ivy_ast_string_node *string_node
= (struct ivy_ast_string_node *)node;
#if 0
struct mie_value *var_ptr = mie_builder_get_string_ptr(
gen->c_builder, string_node->n_value->t_str);
struct mie_type *str = mie_ctx_get_type(gen->c_ctx, MIE_TYPE_STR);
@@ -168,8 +173,9 @@ static struct code_generator_result gen_string(
if (status != IVY_OK) {
return CODEGEN_RESULT_ERR(status);
}
#endif
return CODEGEN_RESULT_OK(0);
return CODEGEN_RESULT_ERR(IVY_ERR_NOT_SUPPORTED);
}
static struct code_generator_result gen_fstring(
@@ -416,6 +422,7 @@ static enum ivy_status gen_assignment(
struct ivy_ast_op_node *op, struct expr_item *left,
struct expr_item *right, struct mie_value **result)
{
#if 0
struct mie_value *left_value = left->i_value;
struct mie_value *right_value = right->i_value;
@@ -452,8 +459,9 @@ static enum ivy_status gen_assignment(
codegen_store_variable(gen, &left->i_var, right_value);
*result = right_value;
#endif
return IVY_OK;
return IVY_ERR_NOT_SUPPORTED;
}
static enum ivy_status gen_op_assignment(
@@ -461,6 +469,7 @@ static enum ivy_status gen_op_assignment(
struct ivy_ast_op_node *op, struct expr_item *left,
struct expr_item *right, struct mie_value **result)
{
#if 0
struct mie_value *op_value = NULL;
if (left->i_operand_type != EXPR_OPERAND_VAR) {
@@ -502,13 +511,15 @@ static enum ivy_status gen_op_assignment(
codegen_store_variable(gen, &left->i_var, op_value);
*result = op_value;
#endif
return IVY_OK;
return IVY_ERR_NOT_SUPPORTED;
}
static struct mie_value *load_variable(
struct ivy_codegen *gen, struct codegen_var *var)
{
#if 0
struct ivy_ast_ident_node *ident = (struct ivy_ast_ident_node *)var->v_node;
struct mie_value *var_ptr = NULL;
@@ -526,12 +537,16 @@ static struct mie_value *load_variable(
= mie_builder_load(gen->c_builder, id, var_ptr, NULL);
return var_value;
#endif
return NULL;
}
static enum ivy_status state_fini(
struct ivy_codegen *gen, struct code_generator_state *state,
struct code_generator_value *result)
{
#if 0
#define OP_IS_ASSIGNMENT(id) \
((id) == IVY_OP_ASSIGN || (id) == IVY_OP_ADD_ASSIGN \
|| (id) == IVY_OP_SUBTRACT_ASSIGN || (id) == IVY_OP_MULTIPLY_ASSIGN \
@@ -695,6 +710,8 @@ static enum ivy_status state_fini(
result->v_value.mie_value = result_value;
return status;
#endif
return IVY_ERR_NOT_SUPPORTED;
}
static struct code_generator_result value_received(