From ee457d92c2d99d85f61346ccd7dd3a6c21b294b6 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 2 Jul 2007 12:49:35 +0000 Subject: * compile.c: rename iseq_translate_direct_threaded_code() to iseq_translate_threaded_code(). * eval_intern.h, yarvcore.h: mv EXEC_EVENT_HOOK() and exec_event_hooks() to yarvcore.h. * insnhelper.ci, vm.c: mv yarv_finish_insn_seq to vm.c. * insns.def (opt_call_c_function): fix to use RESTORE_REGS(). * iseq.c (rb_iseq_build_for_ruby2cext): fix to allocate iseq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 0cc2483917..81e6ee2f81 100644 --- a/vm.c +++ b/vm.c @@ -38,6 +38,14 @@ static NODE *lfp_set_special_cref(VALUE *lfp, NODE * cref); static inline int block_proc_is_lambda(VALUE procval); +#if OPT_STACK_CACHING +static VALUE yarv_finish_insn_seq[1] = { BIN(finish_SC_ax_ax) }; +#elif OPT_CALL_THREADED_CODE +static VALUE const yarv_finish_insn_seq[1] = { 0 }; +#else +static VALUE yarv_finish_insn_seq[1] = { BIN(finish) }; +#endif + void rb_vm_change_state(void) { @@ -56,7 +64,7 @@ rb_vm_set_finish_env(rb_thread_t *th) return Qtrue; } -static void +void rb_vm_set_top_stack(rb_thread_t *th, VALUE iseqval) { rb_iseq_t *iseq; @@ -74,7 +82,7 @@ rb_vm_set_top_stack(rb_thread_t *th, VALUE iseqval) th->cfp->sp, 0, iseq->local_size); } -VALUE +void rb_vm_set_eval_stack(rb_thread_t *th, VALUE iseqval) { rb_iseq_t *iseq; @@ -86,7 +94,6 @@ rb_vm_set_eval_stack(rb_thread_t *th, VALUE iseqval) vm_push_frame(th, iseq, FRAME_MAGIC_EVAL, block->self, GC_GUARDED_PTR(block->dfp), iseq->iseq_encoded, th->cfp->sp, block->lfp, iseq->local_size); - return 0; } /* Env */ -- cgit v1.2.3