push undef to the stack as a first dummy object

This commit is contained in:
Yuichi Nishiwaki 2013-10-15 09:02:49 +09:00
parent 528c2e2c15
commit fea6b7f633
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ pic_open()
/* prepare VM stack */
pic->stbase = pic->sp = (pic_value *)malloc(sizeof(pic_value) * 1024);
pic->stend = pic->stbase + 1024;
*pic->sp = pic_nil_value(); /* push dummy object */
*pic->sp = pic_undef_value(); /* push dummy object */
/* memory heap */
pic->heap = (struct heap_page *)malloc(sizeof(struct heap_page));