diff options
| author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-30 05:56:13 +0000 |
|---|---|---|
| committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-05-30 05:56:13 +0000 |
| commit | 2de9bf108ef949a3af13299499ef207528df62ac (patch) | |
| tree | 372a124cb831288479f8807bcb53d3cfbf533b9b /eval_intern.h | |
| parent | 7d52d7ec653139f3ca373b05d8be7910e73e0193 (diff) | |
| download | ruby-2de9bf108ef949a3af13299499ef207528df62ac.tar.gz ruby-2de9bf108ef949a3af13299499ef207528df62ac.tar.xz ruby-2de9bf108ef949a3af13299499ef207528df62ac.zip | |
* cont.c (cont_capture): store all local variables in heap
([ruby-dev:30832]).
* vm.c (th_stack_to_heap): added.
* test/ruby/test_continuation.rb: add a test for above.
* eval_intern.h (th_get_ruby_level_cfp): fix to clean code.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_intern.h')
| -rw-r--r-- | eval_intern.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/eval_intern.h b/eval_intern.h index 157e7a58b..abfb7794a 100644 --- a/eval_intern.h +++ b/eval_intern.h @@ -207,18 +207,13 @@ NODE *th_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE * cref_stack); static rb_control_frame_t * th_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp) { - rb_iseq_t *iseq = 0; while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) { if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) { - iseq = cfp->iseq; - break; + return cfp; } cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp); } - if (!iseq) { - return 0; - } - return cfp; + return 0; } static inline NODE * |
