asm: update bluelib api usage

This commit is contained in:
2025-11-06 10:38:40 +00:00
parent 4386965cd9
commit 06f384e089
11 changed files with 105 additions and 86 deletions

View File

@@ -1,9 +1,9 @@
#include "assembler.h"
#include <blue/core/hash.h>
#include <blue/object/hashmap.h>
#include <blue/object/number.h>
#include <blue/object/string.h>
#include <blue/ds/hashmap.h>
#include <blue/ds/number.h>
#include <blue/ds/string.h>
#include <ivy/asm/bin.h>
#include <ivy/asm/instr.h>
#include <ivy/asm/lex.h>
@@ -88,9 +88,9 @@ static enum ivy_status resolve_label_refs(
enum ivy_status status = IVY_OK;
size_t nr_read = 0;
b_queue_iterator it;
b_queue_foreach (&it, &c->s_label_refs) {
struct label *label_ref = b_unbox(struct label, it.entry, l_entry);
b_queue_entry *entry = b_queue_first(&c->s_label_refs);
while (entry) {
struct label *label_ref = b_unbox(struct label, entry, l_entry);
struct label *label_dest = get_label(c, label_ref->l_name->t_str);
if (!label_dest) {
@@ -114,6 +114,7 @@ static enum ivy_status resolve_label_refs(
x = b_i32_htob(instr);
assembler_write_data_at(as, &x, label_ref->l_offset, sizeof x);
entry = b_queue_next(entry);
}
return status;