allocate jmpbuf array in heap

This commit is contained in:
Yuichi Nishiwaki
2014-07-24 11:02:47 +09:00
parent 2f44145d3e
commit 3cb46b9b79
7 changed files with 29 additions and 15 deletions
+1
View File
@@ -109,6 +109,7 @@ typedef struct {
jmp_buf *jmp;
struct pic_error *err;
struct pic_jmpbuf *try_jmps;
size_t try_jmp_size, try_jmp_idx;
struct pic_heap *heap;
struct pic_object **arena;
+3
View File
@@ -30,6 +30,9 @@ struct pic_cont {
size_t arena_size;
int arena_idx;
struct pic_jmpbuf *try_jmps;
size_t try_jmp_idx, try_jmp_size;
pic_value results;
};
-1
View File
@@ -15,7 +15,6 @@ struct pic_jmpbuf {
pic_value *sp;
pic_code *ip;
jmp_buf *prev_jmp;
struct pic_jmpbuf *prev;
};
/* do not return from try block! */