Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 28, 2012
  1. @ko1

    * vm_core.h: remove rb_control_frame_t::bp (bp: base pointer).

    ko1 authored
      `bp' can be calculate by `sp' (stack pointer) of previous frame.
      Now, `bp_check' field is remained for debug.  You can eliminate
      this field by setting  VM_DEBUG_BP_CHECK as 0.
    * vm_insnhelper.c (vm_base_ptr): add `vm_base_ptr(cfp).
      This function calculates base pointer from cfp.
    * vm_insnhelper.c (vm_setup_method): push `recv' value on top of
      value stack (before method parameters).
      This change is for keeping consistency with normal method dispatch.
    * insns.def: fix to use vm_base_ptr().
    * vm.c (vm_exec): ditto.
    * vm_dump.c: remove `bp' related dumps.
    * cont.c (fiber_init): fix to check VM_DEBUG_BP_CHECK.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 7, 2012
  1. @ko1

    * vm_exec.c, insns.def (leave): solve problems on

    ko1 authored
      OPT_CALL_THREADED_CODE.
      Catch up finish frame structure on OPT_CALL_THREADED_CODE.
    * vm_core.h: add rb_thread_t#retval for temporary space on
      OPT_CALL_THREADED_CODE.
    * vm.c (th_init): clear rb_thread_t#retval as Qundef.
    * vm_dump.c (rb_vmdebug_debug_print_pre): fix debug print format.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 9, 2012
  1. @kosaki

    * dln.c: Simplify and make consistent an ifdef for Mac OS X.

    kosaki authored
    * ext/socket/rubysocket.h: ditto.
    * ext/tk/stubs.c: ditto.
    * io.c: ditto.
    * process.c: ditto.
    * signal.c: ditto.
    * vm_dump.c: ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 15, 2012
  1. @ko1

    * vm_core.h: remove VM_FRAME_MAGIC_FINISH (finish frame type).

    ko1 authored
      Before this commit:
      `finish frame' was place holder which indicates that VM loop
      needs to return function.
      If a C method calls a Ruby methods (a method written by Ruby),
      then VM loop will be (re-)invoked.  When the Ruby method returns,
      then also VM loop should be escaped.  `finish frame' has only
      one instruction `finish', which returns VM loop function.
      VM loop function executes `finish' instruction, then VM loop
      function returns itself.
      With such mechanism, `leave' instruction (which returns one
      frame from current scope) doesn't need to check that this `leave'
      should also return from VM loop function.
      Strictly, one branch can be removed from `leave' instructon.
      Consideration:
      However, pushing the `finish frame' needs costs because
      it needs several memory accesses.  The number of pushing
      `finish frame' is greater than I had assumed.  Of course,
      pushing `finish frame' consumes additional control frame.
      Moreover, recent processors has good branch prediction,
      with which we can ignore such trivial checking.
      After this commit:
      Finally, I decide to remove `finish frame' and `finish'
      instruction.  Some parts of VM depend on `finish frame',
      so the new frame flag VM_FRAME_FLAG_FINISH is introduced.
      If this frame should escape from VM function loop, then
      the result of VM_FRAME_TYPE_FINISH_P(cfp) is true.
      `leave' instruction checks this flag every time.
      I measured performance on it.  However on my environments,
      it improves some benchmarks and slows some benchmarks down.
      Maybe it is because of C compiler optimization parameters.
      I'll re-visit here if this cause problems.
    * insns.def (leave, finish): remove finish instruction.
    * vm.c, vm_eval.c, vm_exec.c, vm_backtrace.c, vm_dump.c:
      apply above changes.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 11, 2012
  1. @ko1

    * vm_core.h: remove lfp (local frame pointer) and rename

    ko1 authored
      dfp (dynamic frame pointer) to ep (environment pointer).
      This change make VM `normal' (similar to other interpreters).
      Before this commit:
      Each frame has two env pointers lfp and dfp.  lfp points
      local environment which is method/class/toplevel frame.
      lfp[0] is block pointer.
      dfp is block local frame. dfp[0] points previous (parent)
      environment pointer.
      lfp == dfp when frame is method/class/toplevel.
      You can get lfp from dfp by traversing previous environment
      pointers.
      After this commit:
      Each frame has only `ep' to point respective enviornoment.
      If there is parent environment, then ep[0] points parent
      envioenment (as dfp).  If there are no more environment,
      then ep[0] points block pointer (as lfp).  We call such ep
      as `LEP' (local EP).  We add some macros to get LEP and to
      detect LEP or not.
      In short, we replace dfp and lfp with ep and LEP.
      rb_block_t and rb_binding_t member `lfp' and `dfp' are removed
      and member `ep' is added.
      rename rb_thread_t's member `local_lfp' and `local_svar' to
      `root_lep' and `root_svar'.
      (VM_EP_PREV_EP(ep)): get previous environment pointer.  This macro
      assume that ep is not LEP.
      (VM_EP_BLOCK_PTR(ep)): get block pointer.  This macro assume
      that ep is LEP.
      (VM_EP_LEP_P(ep)): detect ep is LEP or not.
      (VM_ENVVAL_BLOCK_PTR(ptr)): make block pointer.
      (VM_ENVVAL_BLOCK_PTR_P(v)): detect v is block pointer.
      (VM_ENVVAL_PREV_EP_PTR(ptr)): make prev environment pointer.
      (VM_ENVVAL_PREV_EP_PTR_P(v)): detect v is prev env pointer.
    * vm.c: apply above changes.
      (VM_EP_LEP(ep)): get LEP.
      (VM_CF_LEP(cfp)): get LEP of cfp->ep.
      (VM_CF_PREV_EP(cfp)): utility function VM_EP_PREV_EP(cfp->ep).
      (VM_CF_BLOCK_PTR(cfp)): utility function VM_EP_BLOCK_PTR(cfp->ep).
    * vm.c, vm_eval.c, vm_insnhelper.c, vm_insnhelper.h, insns.def:
      apply above changes.
    * cont.c: ditto.
    * eval.c, eval_intern.h: ditto.
    * proc.c: ditto.
    * thread.c: ditto.
    * vm_dump.c: ditto.
    * vm_exec.h: fix function name (on vm debug mode).
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 4, 2012
  1. @ko1

    * vm_core.h (rb_location_t): fix type and field name.

    ko1 authored
      (1) rename rb_location_t to rb_iseq_location_t.
      (2) rename field names of rb_iseq_location_t to adjust
      RubyVM::Backtrace::Location methods.
      (2-1) filename -> path
      (2-2) filepath -> absolute_path
      (2-3) basename -> base_label
      (2-4) name -> label
      (3) rename filed name rb_iseq_location_t#line_no to
      rb_iseq_location_t#first_lineno to clear purpose of this field.
      (4) The field names rb_binding_t#(filename|line_no) are also renamed
      to rb_binding_t#(path|first_lineno).
    * compile.c: apply above changes.
    * iseq.c: ditto.
    * proc.c: ditto.
    * vm*.c: ditto.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 2, 2012
  1. @ko1

    * common.mk: fix to build vm_backtrace.c only itself (vm_backtrace.c

    ko1 authored
      is no longer included from vm.c).  I hope this separation reduce
      compile time of vm.c.
    * internal.h: ditto.
    * vm.c, vm_core.h, vm_dump.c, vm_eval.c: ditto.
    * vm_eval.c: some functions (callee, etc) moved to vm_backtrace.c.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 25, 2012
  1. @ko1

    * vm.c: refactoring backtrace related funcitons.

    ko1 authored
      (1) unify similar functions (rb_backtrace_each() and
      backtrace_object()).  backtrace_each() is a unified function.
      variation:
      a) backtrace_object(): create backtrace object.
      b) vm_backtrace_str_ary(): create bt as an array of string.
      c) vm_backtrace_print(): print backtrace to specified file.
      d) rb_backtrace_print_as_bugreport(): print backtrace on
      bugreport style.
      (2) remove rb_backtrace_each().  Use backtrace_each() instead.
      (3) chang the type of lev parameter to size_t.
      a) lev == 0 means current frame (exception, etc use it).
      b) lev == 1 means upper frame (caller(0) use it).
    * vm_core.h, vm_dump.c, vm_eval.c: ditto.
    * vm.c (backtrace_object(), vm_backtrace_str_ary()): fix to return a
      correct size of caller(lev) array.
      Let n be a "caller(0).size" then ln as caller(lev).size should be
      (n - lev).  However, the previous implementation returns a wrong
      size array (ln > n - lev).  [ruby-dev:45673]
    * test/ruby/test_backtrace.rb: add tests for backtrace.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 22, 2012
  1. @ko1

    * vm_core.h: add a data type rb_location_t to store iseq location

    ko1 authored
      information.
      rb_location_t#filename, filepath, name and line_no was moved from
      rb_iseq_t.  rb_location_t#basename is a new field which is
      similar to `name' field without any decoration.
      `name' field contains some decoration such as `block in foo'.
      `basename' only contains `foo'.
      rb_iseq_t contains memory object of rb_location_t.
    * iseq.c: setup rb_location_t for each rb_iseq_t memory objects.
    * compile.c, proc.c, vm.c, vm_dump.c, vm_eval.c, vm_insnhelper.c,
      vm_method.c: support about it.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 27, 2011
  1. @kosaki

    * io.c (rb_write_error2): get rid of warning on linux. fwrite

    kosaki authored
      of glibc is tagged __attribute__ ((__warn_unused_result__))
      if _FORTIFY_SOURCE != 0.
    * vm_dump.c (rb_vm_bugreport): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33871 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 11, 2011
  1. @nobu

    * vm_dump.c (HAVE_BACKTRACE): fallback to 0.

    nobu authored
    * vm_dump.c (rb_vm_bugreport): show "Other runtime information"
      header only when available.
    * vm_dump.c (rb_vm_bugreport): get rid of modifying the content of
      VM directly.
    * vm_dump.c (rb_vm_bugreport): check if vm is non-null.
      Pointed out by Ikegami Daisuke <ikegami.da@gmail.com>.
      Thank you.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 27, 2011
  1. @nobu

    * vm_dump.c (VMDEBUG): suppress undefined macro warnings.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 8, 2011
  1. @nurse

    * addr2line.c: use USE_ELF instead of __ELF__ because Solaris

    nurse authored
      doesn't define it. USE_ELF is already provided by configure.
      patched by Naohisa Goto. [ruby-dev:44066] [Bug #4998]
    
    * addr2line.h: ditto.
    
    * vm_dump.c: ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 26, 2011
  1. @kosaki

    * vm_dump.c (rb_vm_bugreport): change CrashReporter suggestion messages

    kosaki authored
      on Mac. It should be placed after "-- C level backtrace" line.
      Suggested by Endoh-san.
    
      <before>
      -- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------
      -- /Library/Logs/CrashReporter, for the more detail of ---------------------
      -- C level backtrace information -------------------------------------------
    
    <after>
      -- C level backtrace information -------------------------------------------
    
         See Crash Report log file under ~/Library/Logs/CrashReporter or
         /Library/Logs/CrashReporter, for the more detail of.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jan 13, 2011
  1. @mrkn

    * vm_dump.c: delete dashes to make lines 80 chars, Patched by

    mrkn authored
      Shota Fukumori (sora_h).  [Bug #4275] [ruby-dev:43021]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @mrkn

    * vm_dump.c: fix misspelling of CrashReporter.

    mrkn authored
      [Bug #4275] [ruby-dev:43021]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jan 12, 2011
  1. @akr

    * vm_dump.c: parenthesize macro arguments.

    akr authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 8, 2010
  1. @nobu

    * vm_dump.c (rb_vm_bugreport): suppress a warning.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 30, 2010
  1. @nurse

    * vm_dump.c: undef HAVE_BACKTRACE when the OS is FreeBSD (in other

    nurse authored
      words backtrace() is libexecinfo) and it is optimized.
      This temporary hack should be also applied to other libexecinfo
      environments.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 27, 2010
  1. @nobu

    * vm_dump.c (rb_vm_bugreport): see CrashReport log on Mac OS X.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 26, 2010
  1. @nurse

    * addr2line.c: added to show source filename and line number of

    nurse authored
      functions in backtrace. [ruby-dev:42625]
      a patch from shinichiro.h <shinichiro.hamaji AT gmail.com>
    
    * addr2line.h: ditto.
    
    * common.mk: add addr2line.$(OBJEXT).
    
    * configure.in: check dl_iterate_phdr.
    
    * vm_dump.c (rb_vm_bugreport): use rb_dump_backtrace_with_lines in
      addr2line.c when the binary is ELF.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @unak

    * vm_dump.c (dump_thread): get only required rights of the target

    unak authored
      thread because THREAD_ALL_ACCESS causes an access error on XP.
      reported by Masaya TARUI via IRC.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. @unak

    * vm_dump.c (dump_thread): show the displacement from the beginning

    unak authored
      of the symbol.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  4. @unak

    * vm_dump.c (dump_thread): follow the output of glibc.

    unak authored
      see [ruby-dev:42627]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  5. @unak

    * vm_dump.c (dump_thread): seems to be necessary the 3rd argument of

    unak authored
      SymGetLineFromAddr64(), even though MSDN says it can be zero.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Nov 11, 2010
  1. @nobu

    * fix type warnings.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 23, 2010
  1. @ko1

    * vm_dump.c (rb_vm_bugreport): fix to add bug outputs.

    ko1 authored
      - loaded script ($0)
      - loaded features ($")
      - process memory map on Linux (/proc/self/maps)
    * vm_dump.c (rb_vmdebug_stack_dump_raw): fix header message.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 13, 2010
  1. @nobu

    * vm_dump.c (dump_thread): suppress a warning.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 12, 2010
  1. @nobu

    * configure.in (RUBY_CHECK_PRINTF_PREFIX): check for printf format

    nobu authored
      specifier if possible.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. @unak

    * vm_dump.c (dump_thread): foolish mistake.

    unak authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29444 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 30, 2010
  1. @unak

    * vm_dump.c (dump_thread): fixed wrong type of return value of

    unak authored
      SymGetModuleBase64(). [ruby-dev:42306]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 29, 2010
  1. @unak

    * vm_dump.c (dump_thread): remove ununsed optional arguments.

    unak authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 28, 2010
  1. @unak

    * vm_dump.c (rb_vm_bugreport): add windows support.

    unak authored
      based on patchs from Peter Weldon at [ruby-core:32551]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29352 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 11, 2010
  1. @nobu

    * eval_intern.h (rb_vm_get_sourceline): add prototype.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Apr 15, 2010
  1. @nobu

    * vm_dump.c (bugreport_backtrace): ditto.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Something went wrong with that request. Please try again.