lang: remove references to old mie api
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#include "../debug.h"
|
||||
#include "codegen.h"
|
||||
|
||||
#include <mie/ir/func.h>
|
||||
#include <mie/ir/phi.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -32,6 +30,7 @@ static struct code_generator_result gen_expr(
|
||||
struct ivy_ast_node *node, size_t depth)
|
||||
{
|
||||
struct cond_codegen_state *cond = (struct cond_codegen_state *)state;
|
||||
#if 0
|
||||
struct mie_func *func = mie_builder_get_current_func(gen->c_builder);
|
||||
/* this is either the if-condition, or the if-body for an inline
|
||||
* if-statement */
|
||||
@@ -48,6 +47,8 @@ static struct code_generator_result gen_expr(
|
||||
|
||||
codegen_push_generator(gen, CODE_GENERATOR_EXPR, 0, NULL);
|
||||
return CODEGEN_RESULT_OK(CODEGEN_R_REPEAT_NODE);
|
||||
#endif
|
||||
return CODEGEN_RESULT_ERR(IVY_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
static struct code_generator_result gen_block(
|
||||
@@ -55,6 +56,7 @@ static struct code_generator_result gen_block(
|
||||
struct ivy_ast_node *node, size_t depth)
|
||||
{
|
||||
struct cond_codegen_state *cond = (struct cond_codegen_state *)state;
|
||||
#if 0
|
||||
struct mie_func *func = mie_builder_get_current_func(gen->c_builder);
|
||||
|
||||
if (cond->s_cond) {
|
||||
@@ -69,6 +71,8 @@ static struct code_generator_result gen_block(
|
||||
|
||||
codegen_push_generator(gen, CODE_GENERATOR_BLOCK, 0, NULL);
|
||||
return CODEGEN_RESULT_OK(CODEGEN_R_REPEAT_NODE);
|
||||
#endif
|
||||
return CODEGEN_RESULT_ERR(IVY_ERR_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
static enum ivy_status state_init(
|
||||
@@ -87,6 +91,7 @@ static enum ivy_status state_fini(
|
||||
{
|
||||
debug_printf("codegen: end of cond\n");
|
||||
struct cond_codegen_state *cond = (struct cond_codegen_state *)state;
|
||||
#if 0
|
||||
struct mie_func *func = mie_builder_get_current_func(gen->c_builder);
|
||||
struct mie_block *block = mie_builder_get_current_block(gen->c_builder);
|
||||
|
||||
@@ -101,12 +106,15 @@ static enum ivy_status state_fini(
|
||||
}
|
||||
|
||||
return IVY_OK;
|
||||
#endif
|
||||
return IVY_ERR_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
static void set_cond(
|
||||
struct ivy_codegen *gen, struct cond_codegen_state *cond,
|
||||
struct mie_value *value)
|
||||
{
|
||||
#if 0
|
||||
struct mie_type *cond_type = mie_value_get_type(value, gen->c_ctx);
|
||||
|
||||
if (cond_type->t_id == MIE_TYPE_INT && cond_type->t_width == 1) {
|
||||
@@ -118,6 +126,7 @@ static void set_cond(
|
||||
= mie_builder_cmp_neq(gen->c_builder, value, zero, NULL);
|
||||
cond->s_cond = cmp;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static struct code_generator_result value_received(
|
||||
|
||||
Reference in New Issue
Block a user