int v;
struct code ins;
- v = evaluate(t->pt.arrow.s, -1, where);
- ins.u.arrow.what = v;
if (t->pt.arrow.left == K_COPY)
ins.u.arrow.copy = 1;
case K_MAIL:
ins.opcode = MAIL;
break;
+ case K_DISCARD:
+ ins.opcode = DISCARD;
+ break;
default:
die("do_arrow: This cannot happen ;-)");
}
+
+ if (t->pt.arrow.right != K_DISCARD) {
+ v = evaluate(t->pt.arrow.s, -1, where);
+ ins.u.arrow.what = v;
+ }
+
new_instr(ins, where);
}
eval_cond(t, -1, where); // warn?
case ST_ARROW:
do_arrow(t, where);
+ break;
default:
- die("compile: got to default");
+ die("compile: got to default, type: %d", t->st);
}
}
case NOP:
puts("NOP");
break;
+ case PIPE:
+ printf("PIPE %d %d\n", p->u.arrow.what, p->u.arrow.copy);
+ break;
+ case STORE:
+ printf("STORE %d %d\n", p->u.arrow.what, p->u.arrow.copy);
+ break;
+ case MAIL:
+ printf("MAIL %d %d\n", p->u.arrow.what, p->u.arrow.copy);
+ break;
+ case DISCARD:
+ puts("DISCARD");
+ break;
default:
printf("not implemented, opcode: %d\n",
p->opcode);