c = eval_cond(t->pt.tif.c, -1, where);
compile(t->pt.tif.i, if_branch);
- compile(t->pt.tif.i, else_branch);
+ compile(t->pt.tif.e, else_branch);
new_instr(nop, else_branch);
jmp.u.jump.target = list_last(else_branch);
new_instr(jmp, if_branch);
char* result;
int v;
- LIST_FOREACH(p, ins) {
+ p = (void*) ins->head.next;
+ while ((struct node*) p != &ins->head) {
switch (p->opcode) {
case OPC_SET:
result = get_var(p->u.set.r);
break;
case OPC_JUMP:
p = p->u.jump.target;
- continue;
- break;
+ continue;
case OPC_JUMP_IF:
- if (eval_cond(p->u.jump_if.cond))
+ if (eval_cond(p->u.jump_if.cond)) {
p = p->u.jump_if.target;
- continue;
+ continue;
+ }
break;
case OPC_JUMP_UNLESS:
- if (!eval_cond(p->u.jump_unless.cond))
+ if (!eval_cond(p->u.jump_unless.cond)) {
p = p->u.jump_unless.target;
- continue;
+ continue;
+ }
break;
case OPC_NOP:
- continue;
break;
case OPC_GT:
case OPC_LT:
case OPC_DISCARD:
bye(0, NULL);
break;
- }}
+ }
+ p = (void*) ((struct node*) p)->next;
+ }
deliver(default_mailbox, 0, hash);
}