save all ireps into pic_state
in order to decrease the stress GC will get, restore irep structures under pic_state instead of under each procs and making it collectable object
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#define PIC_ARENA_SIZE 100
|
||||
#define PIC_HEAP_SIZE 8192
|
||||
#define PIC_STACK_SIZE 1024
|
||||
#define PIC_IREP_SIZE 256
|
||||
|
||||
#define DEBUG 1
|
||||
|
||||
|
||||
@@ -23,6 +23,9 @@ typedef struct {
|
||||
pic_value sADD, sSUB, sMUL, sDIV;
|
||||
struct pic_env *global_env;
|
||||
|
||||
struct pic_irep **irep;
|
||||
size_t ilen, icapa;
|
||||
|
||||
struct heap_page *heap;
|
||||
struct pic_object *arena[PIC_ARENA_SIZE];
|
||||
int arena_idx;
|
||||
|
||||
@@ -30,9 +30,6 @@ struct pic_code {
|
||||
struct pic_irep {
|
||||
struct pic_code *code;
|
||||
size_t clen, ccapa;
|
||||
|
||||
struct pic_irep **proto;
|
||||
size_t plen, pcapa;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user