allow recursive function definition

This commit is contained in:
Yuichi Nishiwaki 2013-10-16 17:43:23 +09:00
parent 6c903db758
commit 4d4fbeb9aa
1 changed files with 2 additions and 1 deletions

View File

@ -251,9 +251,10 @@ pic_gen(pic_state *pic, struct pic_irep *irep, pic_value obj, struct pic_env *en
if (pic_eq_p(pic, proc, sDEFINE)) {
struct pic_pair *gvar;
gvar = env_define(pic, pic_car(pic, pic_cdr(pic, obj)), env);
pic_gen(pic, irep, pic_car(pic, pic_cdr(pic, pic_cdr(pic, obj))), env);
gvar = env_define(pic, pic_car(pic, pic_cdr(pic, obj)), env);
irep->code[irep->clen].insn = OP_GSET;
irep->code[irep->clen].u.gvar = gvar;
irep->clen++;