meta: replace bluelib with fx

This commit is contained in:
2026-03-16 14:07:33 +00:00
parent d2abb6faa3
commit e5546f97c2
105 changed files with 1668 additions and 1668 deletions

View File

@@ -12,7 +12,7 @@
* - each node type (var, msg, expr) gets its own code generator type
* - expr code generator is limited to simple operator arithmetic.
* - when a code generator encounters a node of an equal or lower depth than
* the node that started it, it has reached the end of its subtree.
* the node that started it, it has reached the end of its subst.
* - depth is supplied by the ast iterator.
* - need to devise a way for expression code generator to "return" a
* mie_value for its parent generator to use.
@@ -21,12 +21,12 @@
static struct code_generator_state *get_current_generator_state(
struct ivy_codegen *gen)
{
b_queue_entry *entry = b_queue_last(&gen->c_state);
fx_queue_entry *entry = fx_queue_last(&gen->c_state);
if (!entry) {
return NULL;
}
return b_unbox(struct code_generator_state, entry, s_entry);
return fx_unbox(struct code_generator_state, entry, s_entry);
}
static void code_generator_state_inherit(
@@ -76,7 +76,7 @@ enum ivy_status codegen_push_generator(
return status;
}
b_queue_push_back(&gen->c_state, &state->s_entry);
fx_queue_push_back(&gen->c_state, &state->s_entry);
return IVY_OK;
}
@@ -84,13 +84,13 @@ enum ivy_status codegen_push_generator(
enum ivy_status codegen_pop_generator(
struct ivy_codegen *gen, struct code_generator_value *result)
{
b_queue_entry *entry = b_queue_pop_back(&gen->c_state);
fx_queue_entry *entry = fx_queue_pop_back(&gen->c_state);
if (!entry) {
return IVY_ERR_BAD_STATE;
}
struct code_generator_state *state
= b_unbox(struct code_generator_state, entry, s_entry);
= fx_unbox(struct code_generator_state, entry, s_entry);
enum ivy_status status = IVY_OK;
@@ -109,7 +109,7 @@ enum ivy_status codegen_pop_generator(
enum ivy_status codegen_define_variable(
struct ivy_codegen *gen, const char *ident, const struct codegen_var *var)
{
b_queue_entry *entry = b_queue_last(&gen->c_state);
fx_queue_entry *entry = fx_queue_last(&gen->c_state);
if (!entry) {
return IVY_ERR_NO_ENTRY;
}
@@ -118,7 +118,7 @@ enum ivy_status codegen_define_variable(
while (entry) {
struct code_generator_state *state
= b_unbox(struct code_generator_state, entry, s_entry);
= fx_unbox(struct code_generator_state, entry, s_entry);
const struct code_generator *generator = state->s_gen;
enum ivy_status status = IVY_ERR_NO_ENTRY;
@@ -130,7 +130,7 @@ enum ivy_status codegen_define_variable(
break;
}
entry = b_queue_prev(entry);
entry = fx_queue_prev(entry);
}
return IVY_ERR_NOT_SUPPORTED;
@@ -155,7 +155,7 @@ enum ivy_status resolve_global_variable(
enum ivy_status codegen_resolve_variable(
struct ivy_codegen *gen, const char *ident, struct codegen_var *out)
{
b_queue_entry *entry = b_queue_last(&gen->c_state);
fx_queue_entry *entry = fx_queue_last(&gen->c_state);
if (!entry) {
return IVY_ERR_NO_ENTRY;
}
@@ -164,7 +164,7 @@ enum ivy_status codegen_resolve_variable(
while (entry) {
struct code_generator_state *state
= b_unbox(struct code_generator_state, entry, s_entry);
= fx_unbox(struct code_generator_state, entry, s_entry);
const struct code_generator *generator = state->s_gen;
enum ivy_status status = IVY_ERR_NO_ENTRY;
@@ -177,7 +177,7 @@ enum ivy_status codegen_resolve_variable(
break;
}
entry = b_queue_prev(entry);
entry = fx_queue_prev(entry);
}
#if 0
@@ -187,12 +187,12 @@ enum ivy_status codegen_resolve_variable(
#endif
if (entry) {
entry = b_queue_next(entry);
entry = fx_queue_next(entry);
}
while (entry) {
struct code_generator_state *state
= b_unbox(struct code_generator_state, entry, s_entry);
= fx_unbox(struct code_generator_state, entry, s_entry);
const struct code_generator *generator = state->s_gen;
enum ivy_status status = IVY_OK;
@@ -204,7 +204,7 @@ enum ivy_status codegen_resolve_variable(
return status;
}
entry = b_queue_next(entry);
entry = fx_queue_next(entry);
}
return IVY_OK;
@@ -371,7 +371,7 @@ enum ivy_status ivy_codegen_push_node(
return IVY_ERR_BAD_STATE;
}
if (b_queue_empty(&gen->c_state)) {
if (fx_queue_empty(&gen->c_state)) {
const struct code_generator *generator
= get_root_code_generator(node->n_type);
if (!generator) {
@@ -441,7 +441,7 @@ enum ivy_status ivy_codegen_push_eof(struct ivy_codegen *gen)
.r_status = IVY_OK,
};
while (!b_queue_empty(&gen->c_state)) {
while (!fx_queue_empty(&gen->c_state)) {
struct code_generator_value value = {0};
status = codegen_pop_generator(gen, &value);
if (status != IVY_OK) {