diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 09:17:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-15 09:17:06 +0000 |
commit | 9b45b336ee97477b9c8a81143ee47c52d801412b (patch) | |
tree | b40d5a5f32138109f5c9b0006d6d90f6529a621e /vm_core.h | |
parent | e7a660a3cfe9a8747b0a5f5b0c88019f5a19bbce (diff) |
* vm_core.h (rb_vm_t), vm.c (rb_vm_mark): moved preallocated special
exceptions.
* eval.c (Init_eval), gc.c (Init_GC), proc.c (Init_Proc): freeze
preallocated special exceptions.
* eval.c (rb_longjmp): duplicate the thrown exception to set backtrace
if it was frozen.
* gc.c (rb_memerror): raise nomem_error without backtrace if failed to
make backtrace.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -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 */ |