summaryrefslogtreecommitdiff
path: root/bxgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'bxgen.c')
-rwxr-xr-xbxgen.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bxgen.c b/bxgen.c
index 00bfb88..6c9acf0 100755
--- a/bxgen.c
+++ b/bxgen.c
@@ -401,16 +401,17 @@ void proc_node_remove(pool_t *pool, i64 proc, i64 node) {
proc_t *p = &pool->entities[proc].proc;
node_t *n = &pool->entities[node].node;
+ // TODO
+ // Implement large entities.
+
assert(n->index_in_proc != UNDEFINED);
+ assert(p->nodes[n->index_in_proc] == node);
if (n->op == CTRL_RET) {
assert(p->ret_index != UNDEFINED);
p->ret_index = UNDEFINED;
}
- // TODO
- // Implement large entities.
-
p->nodes[n->index_in_proc] = UNDEFINED;
n->index_in_proc = UNDEFINED;
}
@@ -462,11 +463,12 @@ void unit_proc_remove(pool_t *pool, i64 unit, i64 proc) {
unit_t *u = &pool->entities[unit].unit;
proc_t *p = &pool->entities[proc].proc;
- assert(p->index_in_unit != UNDEFINED);
-
// TODO
// Implement large entities.
+ assert(p->index_in_unit != UNDEFINED);
+ assert(u->procs[p->index_in_unit] == proc);
+
u->procs[p->index_in_unit] = UNDEFINED;
p->index_in_unit = UNDEFINED;
}