summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorWormHeamer2025-10-28 02:10:20 -0400
committerWormHeamer2025-10-28 02:10:20 -0400
commitf360f57c45073b5e9ea74da442174b53020d15ec (patch)
tree9d49d355288a2c16e7bf86692049c67bd3d30e15 /main.c
parent70a96b84946ad994051b3a378789507e2283a6d5 (diff)
parent89bc739611419ba52a6e6e692e9fd965ffa7d837 (diff)
Merge branch 'dev'
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