remove unused auxuality data field proc->aux
This commit is contained in:
parent
c2b9331083
commit
1d9410638d
|
@ -16,7 +16,6 @@ struct pic_proc {
|
|||
struct pic_irep *irep;
|
||||
} u;
|
||||
struct pic_env *env;
|
||||
pic_value aux;
|
||||
};
|
||||
|
||||
#define pic_proc_p(o) (pic_type(o) == PIC_TT_PROC)
|
||||
|
@ -26,6 +25,6 @@ struct pic_proc {
|
|||
#define pic_proc_cfunc_p(o) (pic_proc_ptr(o)->cfunc_p)
|
||||
|
||||
struct pic_proc *pic_proc_new(pic_state *, struct pic_irep *, struct pic_env *);
|
||||
struct pic_proc *pic_proc_new_cfunc(pic_state *, pic_func_t, pic_value);
|
||||
struct pic_proc *pic_proc_new_cfunc(pic_state *, pic_func_t);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -670,7 +670,7 @@ pic_defun(pic_state *pic, const char *name, pic_func_t cfunc)
|
|||
struct pic_proc *proc;
|
||||
int idx;
|
||||
|
||||
proc = pic_proc_new_cfunc(pic, cfunc, pic_undef_value());
|
||||
proc = pic_proc_new_cfunc(pic, cfunc);
|
||||
idx = scope_global_define(pic, name);
|
||||
pic->globals[idx] = pic_obj_value(proc);
|
||||
}
|
||||
|
|
1
src/gc.c
1
src/gc.c
|
@ -170,7 +170,6 @@ gc_mark_object(pic_state *pic, struct pic_object *obj)
|
|||
if (proc->env) {
|
||||
gc_mark_object(pic, (struct pic_object *)proc->env);
|
||||
}
|
||||
gc_mark(pic, proc->aux);
|
||||
break;
|
||||
}
|
||||
case PIC_TT_PORT: {
|
||||
|
|
|
@ -11,12 +11,11 @@ pic_proc_new(pic_state *pic, struct pic_irep *irep, struct pic_env *env)
|
|||
proc->cfunc_p = false;
|
||||
proc->u.irep = irep;
|
||||
proc->env = env;
|
||||
proc->aux = pic_undef_value();
|
||||
return proc;
|
||||
}
|
||||
|
||||
struct pic_proc *
|
||||
pic_proc_new_cfunc(pic_state *pic, pic_func_t cfunc, pic_value aux)
|
||||
pic_proc_new_cfunc(pic_state *pic, pic_func_t cfunc)
|
||||
{
|
||||
struct pic_proc *proc;
|
||||
|
||||
|
@ -24,7 +23,6 @@ pic_proc_new_cfunc(pic_state *pic, pic_func_t cfunc, pic_value aux)
|
|||
proc->cfunc_p = true;
|
||||
proc->u.cfunc = cfunc;
|
||||
proc->env = NULL;
|
||||
proc->aux = aux;
|
||||
return proc;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue