ruby-changes:48379
From: ko1 <ko1@a...>
Date: Sat, 28 Oct 2017 04:17:00 +0900 (JST)
Subject: [ruby-changes:48379] ko1:r60493 (trunk): catch up recent changes for call threaded code VM.
ko1 2017-10-28 04:16:51 +0900 (Sat, 28 Oct 2017) New Revision: 60493 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60493 Log: catch up recent changes for call threaded code VM. Fix compile errors for OPT_CALL_THREADED_CODE (in vm_opts.h). Modified files: trunk/insns.def trunk/vm_exec.c trunk/vm_exec.h Index: vm_exec.c =================================================================== --- vm_exec.c (revision 60492) +++ vm_exec.c (revision 60493) @@ -140,9 +140,10 @@ rb_vm_get_insns_address_table(void) https://github.com/ruby/ruby/blob/trunk/vm_exec.c#L140 } static VALUE -vm_exec_core(rb_execution_cntext_t *ec, VALUE initial) +vm_exec_core(rb_execution_context_t *ec, VALUE initial) { register rb_control_frame_t *reg_cfp = ec->cfp; + rb_thread_t *th = rb_ec_thread_ptr(ec); while (1) { reg_cfp = ((rb_insn_func_t) (*GET_PC()))(ec, reg_cfp); Index: vm_exec.h =================================================================== --- vm_exec.h (revision 60492) +++ vm_exec.h (revision 60493) @@ -60,7 +60,7 @@ error ! https://github.com/ruby/ruby/blob/trunk/vm_exec.h#L60 #define INSN_ENTRY(insn) \ static rb_control_frame_t * \ - FUNC_FASTCALL(LABEL(insn))(rb_thread_t *th, rb_control_frame_t *reg_cfp) { + FUNC_FASTCALL(LABEL(insn))(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp) { #define END_INSN(insn) return reg_cfp;} @@ -161,7 +161,7 @@ default: \ https://github.com/ruby/ruby/blob/trunk/vm_exec.h#L161 #if OPT_CALL_THREADED_CODE #define THROW_EXCEPTION(exc) do { \ - th->ec->errinfo = (VALUE)(exc); \ + ec->errinfo = (VALUE)(exc); \ return 0; \ } while (0) #else Index: insns.def =================================================================== --- insns.def (revision 60492) +++ insns.def (revision 60493) @@ -998,7 +998,7 @@ leave https://github.com/ruby/ruby/blob/trunk/insns.def#L998 if (vm_pop_frame(ec, GET_CFP(), GET_EP())) { #if OPT_CALL_THREADED_CODE - th->retval = val; + rb_ec_thread_ptr(ec)->retval = val; return 0; #else return val; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/