summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/vm_core.h b/vm_core.h
index 44f871dd6f..94527bbfa6 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -387,6 +387,9 @@ typedef struct rb_vm_struct {
/* hook */
rb_hook_list_t event_hooks;
+ /* relation table of ensure - rollback for callcc */
+ struct st_table *ensure_rollback_table;
+
/* postponed_job */
struct rb_postponed_job_struct *postponed_job_buffer;
int postponed_job_index;
@@ -507,6 +510,17 @@ typedef struct rb_thread_list_struct{
} rb_thread_list_t;
+typedef struct rb_ensure_entry {
+ VALUE marker;
+ VALUE (*e_proc)(ANYARGS);
+ VALUE data2;
+} rb_ensure_entry_t;
+
+typedef struct rb_ensure_list {
+ struct rb_ensure_list *next;
+ struct rb_ensure_entry entry;
+} rb_ensure_list_t;
+
typedef struct rb_thread_struct {
VALUE self;
rb_vm_t *vm;
@@ -626,6 +640,9 @@ typedef struct rb_thread_struct {
VALUE root_fiber;
rb_jmpbuf_t root_jmpbuf;
+ /* ensure & callcc */
+ rb_ensure_list_t *ensure_list;
+
/* misc */
int method_missing_reason;
int abort_on_exception;