irerror(self->context, "unreachable statement (%s)", self->label);
return false;
}
- in = ir_instr_new(ctx, self, op);
- if (!in)
- return false;
if (target->store == store_value &&
(op < INSTR_STOREP_F || op > INSTR_STOREP_FNC))
return false;
}
+ in = ir_instr_new(ctx, self, op);
+ if (!in)
+ return false;
+
if (!ir_instr_op(in, 0, target, true) ||
!ir_instr_op(in, 1, what, false))
{
+ ir_instr_delete(in);
return false;
}
vec_push(self->instr, in);
if (!in)
return false;
- if (v && !ir_instr_op(in, 0, v, false))
+ if (v && !ir_instr_op(in, 0, v, false)) {
+ ir_instr_delete(in);
return false;
+ }
vec_push(self->instr, in);
return true;