summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index b001491f00..18d1771035 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -281,6 +281,13 @@ struct rb_iseq_struct {
struct iseq_compile_data *compile_data;
};
+enum ruby_special_exceptions {
+ ruby_error_reenter,
+ ruby_error_nomemory,
+ ruby_error_sysstack,
+ ruby_special_error_count
+};
+
typedef struct rb_iseq_struct rb_iseq_t;
#define GetVMPtr(obj, ptr) \
@@ -307,6 +314,8 @@ struct rb_vm_struct
/* object management */
VALUE mark_object_ary;
+ VALUE special_exceptions[ruby_special_error_count];
+
/* load */
VALUE top_self;
VALUE load_path;
@@ -648,7 +657,7 @@ VALUE vm_make_env_object(rb_thread_t *th, rb_control_frame_t *cfp);
NOINLINE(void rb_gc_save_machine_context(rb_thread_t *));
-RUBY_EXTERN VALUE sysstack_error;
+#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
/* for thread */