mie: update bluelib api usage
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <blue/core/hash.h>
|
||||
#include <blue/object/string.h>
|
||||
#include <blue/ds/string.h>
|
||||
#include <mie/ir/arg.h>
|
||||
#include <mie/ir/block.h>
|
||||
#include <mie/ir/func.h>
|
||||
@@ -118,19 +118,26 @@ static void cleanup(struct mie_value *value)
|
||||
{
|
||||
struct mie_func *func = MIE_FUNC(value);
|
||||
|
||||
b_queue_iterator it;
|
||||
b_queue_iterator_begin(&func->f_args, &it);
|
||||
while (b_queue_iterator_is_valid(&it)) {
|
||||
struct mie_value *v = b_unbox(struct mie_value, it.entry, v_entry);
|
||||
b_queue_iterator_erase(&it);
|
||||
b_queue_entry *entry = b_queue_first(&func->f_args);
|
||||
b_queue_entry *next = NULL;
|
||||
while (entry) {
|
||||
struct mie_value *v = b_unbox(struct mie_value, entry, v_entry);
|
||||
next = b_queue_next(entry);
|
||||
b_queue_delete(&func->f_args, entry);
|
||||
|
||||
mie_value_destroy(v);
|
||||
entry = next;
|
||||
}
|
||||
|
||||
b_queue_iterator_begin(&func->f_blocks, &it);
|
||||
while (b_queue_iterator_is_valid(&it)) {
|
||||
struct mie_value *v = b_unbox(struct mie_value, it.entry, v_entry);
|
||||
b_queue_iterator_erase(&it);
|
||||
entry = b_queue_first(&func->f_blocks);
|
||||
while (entry) {
|
||||
struct mie_value *v = b_unbox(struct mie_value, entry, v_entry);
|
||||
next = b_queue_next(entry);
|
||||
b_queue_delete(&func->f_blocks, entry);
|
||||
|
||||
mie_value_destroy(v);
|
||||
|
||||
entry = next;
|
||||
}
|
||||
|
||||
mie_name_map_destroy(func->f_names);
|
||||
|
||||
Reference in New Issue
Block a user