[ruby-cvs:59054] ko1:r51903 (trunk): * vm_core.h: split rb_call_info_t into several structs.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Sun Sep 20 03:00:00 JST 2015


ko1	2015-09-20 02:59:58 +0900 (Sun, 20 Sep 2015)

  New Revision: 51903

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51903

  Log:
    * vm_core.h: split rb_call_info_t into several structs.
      * rb_call_info (ci) has compiled fixed information.
      * if ci->flag & VM_CALL_KWARG, then rb_call_info is
        also rb_call_info_with_kwarg. This technique reduce one word
        for major rb_call_info data.
      * rb_calling_info has temporary data (argc, blockptr, recv).
        for each method dispatch. This data is allocated only on
        machine stack.
      * rb_call_cache is for inline method cache.
      Before this patch, only rb_call_info_t data is passed.
      After this patch, above three structs are passed.
      This patch improves:
      * data locarity (rb_call_info is now read-only data).
      * reduce memory consumption (rb_call_info_with_kwarg,
        rb_calling_info).
    * compile.c: use above data.
    * insns.def: ditto.
    * iseq.c: ditto.
    * vm_args.c: ditto.
    * vm_eval.c: ditto.
    * vm_insnhelper.c: ditto.
    * vm_insnhelper.h: ditto.
    * iseq.h: add iseq_compile_data::ci_index and
      iseq_compile_data::ci_kw_indx.
    * tool/instruction.rb: introduce TS_CALLCACHE operand type.

  Modified files:
    trunk/ChangeLog
    trunk/compile.c
    trunk/insns.def
    trunk/iseq.c
    trunk/iseq.h
    trunk/tool/instruction.rb
    trunk/vm.c
    trunk/vm_args.c
    trunk/vm_core.h
    trunk/vm_eval.c
    trunk/vm_insnhelper.c
    trunk/vm_insnhelper.h


More information about the ruby-cvs mailing list