From 4340c23f20d43cbdcb5effaf83db7c426f4d312f Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Wed, 16 Oct 2013 09:30:35 +0900 Subject: [PATCH] cleanup --- src/vm.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/vm.c b/src/vm.c index 9ff1b350..ea75738d 100644 --- a/src/vm.c +++ b/src/vm.c @@ -143,6 +143,9 @@ print_irep(pic_state *pic, struct pic_irep *irep) case OP_STOP: puts("OP_STOP"); break; + default: + puts("<>"); + break; } } } @@ -192,7 +195,6 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en break; } else if (pic_eq_p(pic, proc, sCONS)) { - /* generate args in reverse order*/ pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env); pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, obj)), env); irep->code[irep->clen].insn = OP_CONS; @@ -200,7 +202,6 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en break; } else if (pic_eq_p(pic, proc, sADD)) { - /* generate args in reverse order*/ pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env); pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, obj)), env); irep->code[irep->clen].insn = OP_ADD; @@ -208,7 +209,6 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en break; } else if (pic_eq_p(pic, proc, sSUB)) { - /* generate args in reverse order*/ pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env); pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, obj)), env); irep->code[irep->clen].insn = OP_SUB; @@ -216,7 +216,6 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en break; } else if (pic_eq_p(pic, proc, sMUL)) { - /* generate args in reverse order*/ pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env); pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, obj)), env); irep->code[irep->clen].insn = OP_MUL; @@ -224,7 +223,6 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en break; } else if (pic_eq_p(pic, proc, sDIV)) { - /* generate args in reverse order*/ pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env); pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, obj)), env); irep->code[irep->clen].insn = OP_DIV;