* vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-05-22 09:55:36 +00:00
Родитель 5fa02c5951
Коммит 571883a217
3 изменённых файлов: 23 добавлений и 14 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Thu May 22 18:55:33 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm.c (vm_get_ruby_level_cfp): moved from eval_intern.h.
Thu May 22 17:18:35 2008 Tanaka Akira <akr@fsij.org>
* array.c (rb_ary_compact_bang): fix reallocation size.

Просмотреть файл

@ -228,21 +228,8 @@ NORETURN(void vm_jump_tag_but_local_jump(const int, const VALUE));
NODE *vm_cref_push(rb_thread_t * const th, const VALUE, const int);
NODE *vm_set_special_cref(rb_thread_t *th, VALUE *lfp, NODE * cref_stack);
VALUE vm_make_jump_tag_but_local_jump(const int state, VALUE val);
NODE *ruby_cref(void);
static rb_control_frame_t *
vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp)
{
while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
return cfp;
}
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
return 0;
}
rb_control_frame_t *vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp);
VALUE rb_obj_is_proc(VALUE);
void rb_vm_check_redefinition_opt_method(NODE * const node);
VALUE rb_vm_call_cfunc(const VALUE recv, VALUE (* const func)(VALUE),

18
vm.c
Просмотреть файл

@ -94,6 +94,18 @@ rb_vm_set_eval_stack(rb_thread_t * const th, const VALUE iseqval, NODE * const c
}
}
rb_control_frame_t *
vm_get_ruby_level_cfp(rb_thread_t *th, rb_control_frame_t *cfp)
{
while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(th, cfp)) {
if (RUBY_VM_NORMAL_ISEQ_P(cfp->iseq)) {
return cfp;
}
cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp);
}
return 0;
}
/* Env */
static void
@ -787,6 +799,7 @@ vm_backtrace(rb_thread_t * const th, int lev)
return ary;
}
#if 0
static void
check_svar(void)
{
@ -802,6 +815,7 @@ check_svar(void)
cfp++;
}
}
#endif
NODE *
ruby_cref(void)
@ -1545,6 +1559,7 @@ rb_thread_recycle_stack_release(VALUE * const stack)
#endif
}
#ifdef USE_THREAD_RECYCLE
static rb_thread_t *
thread_recycle_struct(void)
{
@ -1552,6 +1567,7 @@ thread_recycle_struct(void)
memset(p, 0, sizeof(rb_thread_t));
return p;
}
#endif
static void
thread_free(void * const ptr)
@ -1721,6 +1737,7 @@ extern VALUE *rb_gc_register_stack_start;
#endif
/* debug functions */
#if VMDEBUG
static VALUE
sdr(void)
@ -1752,6 +1769,7 @@ nsdr(void)
#endif
return ary;
}
#endif
void
Init_VM(void)