mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@12415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
426fcba891
commit
284565992f
5 changed files with 45 additions and 10 deletions
|
@ -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 *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue