asm: update bluelib api usage
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user