allocate global variable entry area by malloc and save it into pic_state

This commit is contained in:
Yuichi Nishiwaki
2013-10-18 00:15:15 +09:00
parent c92a672e01
commit e7a5784fd7
6 changed files with 61 additions and 63 deletions
+1
View File
@@ -12,6 +12,7 @@
#define PIC_HEAP_SIZE 8192
#define PIC_STACK_SIZE 1024
#define PIC_IREP_SIZE 256
#define PIC_GLOBALS_SIZE 1024
/* enable all debug flags */
#define DEBUG 1
+2
View File
@@ -27,6 +27,8 @@ typedef struct {
pic_value sADD, sSUB, sMUL, sDIV;
struct pic_env *global_env;
pic_value *globals;
size_t glen, gcapa;
struct pic_irep **irep;
size_t ilen, icapa;
-1
View File
@@ -27,7 +27,6 @@ struct pic_code {
union {
double f;
int i;
struct pic_pair *gvar;
} u;
};