From 5f90f496042e26710673040da565251dda9055fd Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sat, 12 Oct 2013 13:01:48 +0900 Subject: [PATCH] remove old VM test code --- Makefile | 7 ------- src/vm.c | 29 ----------------------------- 2 files changed, 36 deletions(-) diff --git a/Makefile b/Makefile index fa9f2971..68b1e94b 100644 --- a/Makefile +++ b/Makefile @@ -6,13 +6,6 @@ build: lex scan.l gcc -o bin/picrin -I./include src/main.c src/state.c src/gc.c src/pair.c src/write.c src/symbol.c src/value.c src/y.tab.c src/lex.yy.c src/eval.c src/bool.c src/vm.c -test-vm: - cd src; \ - yacc -d parse.y; \ - lex scan.l - gcc -o bin/picrin -I./include src/vm.c src/state.c src/gc.c src/pair.c src/write.c src/symbol.c src/value.c src/y.tab.c src/lex.yy.c src/eval.c src/bool.c - bin/picrin - clean: rm -f src/y.tab.c src/y.tab.h src/lex.yy.c rm -f bin/picrin diff --git a/src/vm.c b/src/vm.c index eb7deff4..f8d9a93f 100644 --- a/src/vm.c +++ b/src/vm.c @@ -137,32 +137,3 @@ pic_codegen(pic_state *pic, pic_value obj, struct pic_env *env) return proc; } - -#if 0 -int -main() -{ - pic_state *pic; - struct pic_proc proc; - struct pic_code *code; - pic_value v; - - pic = pic_open(); - - proc.u.code = code = (struct pic_code *)malloc(sizeof(struct pic_code) * 256); - code[0].insn = OP_PUSHI; - code[0].u.i = 1; - code[1].insn = OP_PUSHI; - code[1].u.i = 2; - code[2].insn = OP_ADD; - code[3].insn = OP_STOP; - - v = pic_run(pic, &proc, pic_nil_value()); - - pic_debug(pic, v); - - pic_close(pic); - - return 0; -} -#endif