store stack base and end

This commit is contained in:
Yuichi Nishiwaki
2013-10-12 00:20:53 +09:00
parent 643d8be66d
commit 1a45eab148
2 changed files with 7 additions and 1 deletions
+5 -1
View File
@@ -20,7 +20,11 @@ pic_open()
pic_state *pic;
pic = (pic_state *)malloc(sizeof(pic_state));
pic->sp = (pic_value *)malloc(sizeof(pic_value) * 1024);
/* prepare VM stack */
pic->stbase = pic->sp = (pic_value *)malloc(sizeof(pic_value) * 1024);
pic->stend = pic->stbase + 1024;
pic->global_env = pic_new_empty_env();
return pic;