meta: replace bluelib with fx
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#include "codegen.h"
|
||||
#include "var-map.h"
|
||||
|
||||
#include <blue/core/stringstream.h>
|
||||
#include <blue/ds/list.h>
|
||||
#include <fx/core/stringstream.h>
|
||||
#include <fx/ds/list.h>
|
||||
#include <mie/ir/block.h>
|
||||
#include <mie/ir/func.h>
|
||||
#include <mie/ir/module.h>
|
||||
@@ -142,19 +142,19 @@ static struct code_generator_result gen_while_loop(
|
||||
return CODEGEN_RESULT_OK(CODEGEN_R_REPEAT_NODE);
|
||||
}
|
||||
|
||||
static void serialise_package_name(b_queue *parts, b_stringstream *out)
|
||||
static void serialise_package_name(fx_queue *parts, fx_stringstream *out)
|
||||
{
|
||||
b_stream_write_string(out, "_ZN", NULL);
|
||||
fx_stream_write_string(out, "_ZN", NULL);
|
||||
|
||||
b_queue_entry *entry = b_queue_first(parts);
|
||||
fx_queue_entry *entry = fx_queue_first(parts);
|
||||
while (entry) {
|
||||
struct ivy_token *tok = b_unbox(struct ivy_token, entry, t_entry);
|
||||
struct ivy_token *tok = fx_unbox(struct ivy_token, entry, t_entry);
|
||||
size_t len = strlen(tok->t_str);
|
||||
b_stream_write_fmt(out, NULL, "%zu%s", len, tok->t_str);
|
||||
entry = b_queue_next(entry);
|
||||
fx_stream_write_fmt(out, NULL, "%zu%s", len, tok->t_str);
|
||||
entry = fx_queue_next(entry);
|
||||
}
|
||||
|
||||
b_stream_write_char(out, 'E');
|
||||
fx_stream_write_char(out, 'E');
|
||||
}
|
||||
|
||||
static struct code_generator_result gen_unit_package(
|
||||
@@ -165,10 +165,10 @@ static struct code_generator_result gen_unit_package(
|
||||
struct ivy_ast_unit_package_node *pkg
|
||||
= (struct ivy_ast_unit_package_node *)node;
|
||||
|
||||
b_stringstream *str = b_stringstream_create();
|
||||
fx_stringstream *str = fx_stringstream_create();
|
||||
serialise_package_name(&pkg->n_ident, str);
|
||||
char *ident = b_stringstream_steal(str);
|
||||
b_stringstream_unref(str);
|
||||
char *ident = fx_stringstream_steal(str);
|
||||
fx_stringstream_unref(str);
|
||||
struct mie_value *ident_val = mie_ctx_get_string(gen->c_ctx, ident);
|
||||
free(ident);
|
||||
|
||||
@@ -198,14 +198,14 @@ static struct code_generator_result gen_unit_import(
|
||||
import_list = MIE_ARRAY(rec->r_value);
|
||||
}
|
||||
|
||||
b_stringstream *str = b_stringstream_create();
|
||||
fx_stringstream *str = fx_stringstream_create();
|
||||
serialise_package_name(&pkg->n_ident, str);
|
||||
char *ident = b_stringstream_steal(str);
|
||||
b_stringstream_unref(str);
|
||||
char *ident = fx_stringstream_steal(str);
|
||||
fx_stringstream_unref(str);
|
||||
struct mie_value *ident_val = mie_ctx_get_string(gen->c_ctx, ident);
|
||||
free(ident);
|
||||
|
||||
b_list_push_back(import_list->a_values, ident_val);
|
||||
fx_list_push_back(import_list->a_values, ident_val);
|
||||
|
||||
return CODEGEN_RESULT_OK(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user