allocate global variable entry area by malloc and save it into pic_state
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ struct pic_code {
|
||||
union {
|
||||
double f;
|
||||
int i;
|
||||
struct pic_pair *gvar;
|
||||
} u;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user