summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWormHeamer2025-10-28 02:08:59 -0400
committerWormHeamer2025-10-28 02:08:59 -0400
commit89bc739611419ba52a6e6e692e9fd965ffa7d837 (patch)
tree394480b4d33d9ca5f67ecf6476d2cb6f985e32d4 /main.c
parent2bbb581678fb4871a4211fc96d12fa69c110b693 (diff)
remove Node.refs
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/main.c b/main.c
index a1736f1..4c6c274 100644
--- a/main.c
+++ b/main.c
@@ -256,8 +256,6 @@ void parse_if(Lexer *l, Proc *p) {
region = node_new(g, N_REGION, ctrl_if, if_false);
node_add_out(g, region, g->keepalive);
node_remove(g, ctrl_if, g->keepalive);
- assert(if_true->refs > 0);
- assert(if_false->refs > 0);
}
ctrl(g, region);
node_remove(g, if_true, g->keepalive);
@@ -540,8 +538,7 @@ Node *parse_expr(Lexer *l, Proc *p, Type *twant) {
Graph *g = &p->graph;
Node *lhs = parse_term(l, p, twant);
NodeType nt = tok_to_bin_op(l->tok);;
- if (lhs->refs <= 0) lex_error(l, LE_ERROR, S("dead lhs"));
- assert(lhs->refs > 0);
+ if (lhs->op == N_DEAD) lex_error(l, LE_ERROR, S("dead lhs"));
if (nt != N_START) {
lex_next(l);
/* necessary because if lhs is a deduplicated literal, it may be an input to rhs