From 76dadc844874bd2bcdbc069ea58f71a8f23741b4 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Mon, 4 Nov 2013 15:30:11 -0500 Subject: [PATCH] remove toplevel pic_env that is never used --- src/codegen.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/codegen.c b/src/codegen.c index 812dd357..1556b817 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -647,8 +647,6 @@ pic_codegen(pic_state *pic, pic_value obj) { struct pic_proc *proc; codegen_state *state; - struct pic_env *env; - int i; state = new_codegen_state(pic); @@ -671,15 +669,7 @@ pic_codegen(pic_state *pic, pic_value obj) state->irep->code[state->irep->clen].insn = OP_RET; state->irep->clen++; - env = (struct pic_env *)pic_obj_alloc(pic, sizeof(struct pic_env), PIC_TT_ENV); - env->num_val = state->irep->argc + state->irep->localc; - env->values = (pic_value *)pic_alloc(pic, sizeof(pic_value) * env->num_val); - for (i = 0; i < env->num_val; ++i) { - env->values[i] = pic_undef_value(); - } - env->up = NULL; - - proc = pic_proc_new(pic, state->irep, env); + proc = pic_proc_new(pic, state->irep, NULL); destroy_codegen_state(pic, state);