diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-20 17:54:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-05-20 17:54:07 +0900 |
| commit | 5c0b9b703c9d1a08d7219b057b809bda4bc89f8a (patch) | |
| tree | ab610a2988ef928c02bfc50e31aedc5a707f008e /include/mruby.h | |
| parent | 35ee85164dd19143d4b47a34f13ad2bb71fed369 (diff) | |
| download | mruby-5c0b9b703c9d1a08d7219b057b809bda4bc89f8a.tar.gz mruby-5c0b9b703c9d1a08d7219b057b809bda4bc89f8a.zip | |
primary mruby fiber implementation
Diffstat (limited to 'include/mruby.h')
| -rw-r--r-- | include/mruby.h | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/include/mruby.h b/include/mruby.h index 9fe70e5b8..73c38cf1d 100644 --- a/include/mruby.h +++ b/include/mruby.h @@ -61,16 +61,8 @@ typedef struct { struct REnv *env; } mrb_callinfo; -enum gc_state { - GC_STATE_NONE = 0, - GC_STATE_MARK, - GC_STATE_SWEEP -}; - -typedef struct mrb_state { - void *jmp; - - mrb_allocf allocf; +struct mrb_context { + struct mrb_context *prev; mrb_value *stack; mrb_value *stbase, *stend; @@ -82,10 +74,24 @@ typedef struct mrb_state { int rsize; struct RProc **ensure; int esize; +}; + +enum gc_state { + GC_STATE_NONE = 0, + GC_STATE_MARK, + GC_STATE_SWEEP +}; + +typedef struct mrb_state { + void *jmp; + + mrb_allocf allocf; + + struct mrb_context *c; + struct mrb_context *root_c; struct RObject *exc; struct iv_tbl *globals; - struct mrb_irep **irep; size_t irep_len, irep_capa; @@ -140,7 +146,6 @@ typedef struct mrb_state { struct RClass *eStandardError_class; void *ud; /* auxiliary data */ - } mrb_state; typedef mrb_value (*mrb_func_t)(mrb_state *mrb, mrb_value); |
