Fix most of the notice spam (hacky).

The implementation and declaration of OP_DONE disagree (not sure what to do
about it yet), so give it special treatment when emitting.
This commit is contained in:
Bill Currie 2011-01-11 08:07:04 +09:00
parent f2fb853052
commit 4da2657bfe

View file

@ -110,7 +110,8 @@ emit_statement (expr_t *e, opcode_t *op, def_t *var_a, def_t *var_b,
statement->a = var_a ? var_a->ofs : 0;
statement->b = var_b ? var_b->ofs : 0;
statement->c = 0;
if (op->type_c == ev_invalid || op->right_associative) {
if (op->type_c == ev_invalid || op->right_associative
|| op->opcode == OP_DONE/*stupid opcode*/) {
// ifs, gotos, and assignments don't need vars allocated
if (var_c)
statement->c = var_c->ofs;