remove toplevel pic_env that is never used
This commit is contained in:
parent
70fbe46dc1
commit
76dadc8448
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue