lang: codegen: replace codegen_value with a new system for passing different types of values between code generators
This commit is contained in:
@@ -49,7 +49,7 @@ static enum ivy_status state_init(
|
||||
|
||||
static enum ivy_status state_fini(
|
||||
struct ivy_codegen *gen, struct code_generator_state *state,
|
||||
struct mie_value **result)
|
||||
struct code_generator_value *result)
|
||||
{
|
||||
debug_printf("codegen: end of fstring\n");
|
||||
struct fstring_codegen_state *fstring
|
||||
@@ -62,13 +62,13 @@ static enum ivy_status state_fini(
|
||||
gen->c_builder, id, fstring->s_stringbuilder, sel, NULL, 0, 0,
|
||||
NULL);
|
||||
|
||||
*result = str;
|
||||
code_generator_value_set_mie_value(result, str);
|
||||
return IVY_OK;
|
||||
}
|
||||
|
||||
static struct code_generator_result value_received(
|
||||
struct ivy_codegen *gen, struct code_generator_state *state,
|
||||
struct mie_value *value)
|
||||
struct code_generator_value *value)
|
||||
{
|
||||
struct fstring_codegen_state *fstring
|
||||
= (struct fstring_codegen_state *)state;
|
||||
@@ -78,7 +78,7 @@ static struct code_generator_result value_received(
|
||||
|
||||
mie_builder_msg(
|
||||
gen->c_builder, void_type, fstring->s_stringbuilder, sel,
|
||||
&value, 1, MIE_BUILDER_IGNORE_RESULT, NULL);
|
||||
&value->v_value.mie_value, 1, MIE_BUILDER_IGNORE_RESULT, NULL);
|
||||
|
||||
return CODEGEN_RESULT_OK(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user