summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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