summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-12 05:47:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-12 05:47:10 +0000
commit96240c6d2d09bb186ebfba2f414348663b806010 (patch)
tree0ed32718f2734e001be72859f38ae82180e88029 /eval.c
parent8c36abe23a9c9e980e398171c860a6756716e124 (diff)
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@15756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/eval.c b/eval.c
index 872eb2c..69d5488 100644
--- a/eval.c
+++ b/eval.c
@@ -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);
}
}