diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-12 05:47:10 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-03-12 05:47:10 +0000 |
| commit | d66a0f0ab1563d482cfda1c8a8274afa408afce1 (patch) | |
| tree | 0ed32718f2734e001be72859f38ae82180e88029 /eval.c | |
| parent | 1da80ef1928df61b7ca2eac8d3f7af184fc2fc03 (diff) | |
| download | ruby-d66a0f0ab1563d482cfda1c8a8274afa408afce1.tar.gz ruby-d66a0f0ab1563d482cfda1c8a8274afa408afce1.tar.xz ruby-d66a0f0ab1563d482cfda1c8a8274afa408afce1.zip | |
* eval_intern.h (rb_thread_raised_set): use generic flags.
* eval.c (rb_longjmp): clear all raised flags.
* eval.c (stack_check): leave clearing flag to rb_longjmp.
* gc.c (rb_memerror): use thread raised flag instead of static flag.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
| -rw-r--r-- | eval.c | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -715,7 +715,7 @@ rb_longjmp(int tag, VALUE mesg) 0 /* TODO: id */, 0 /* TODO: klass */); } - rb_thread_reset_raised(th); + rb_thread_raised_clear(th); JUMP_TAG(tag); } @@ -1243,16 +1243,9 @@ stack_check(void) { rb_thread_t *th = GET_THREAD(); - if (!rb_thread_stack_overflowing_p(th) && ruby_stack_check()) { - int state; - rb_thread_set_stack_overflow(th); - PUSH_TAG(); - if ((state = EXEC_TAG()) == 0) { - rb_exc_raise(sysstack_error); - } - POP_TAG(); - rb_thread_reset_stack_overflow(th); - JUMP_TAG(state); + if (!rb_thread_raised_p(th, RAISED_STACKOVERFLOW) && ruby_stack_check()) { + rb_thread_raised_set(th, RAISED_STACKOVERFLOW); + rb_exc_raise(sysstack_error); } } |
