Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Dec 27, 2011
  1. nagachika

    * vm_insnhelper.c (unknown_keyword_error): add GC guard to prevent

    nagachika authored
      intermediate object from GC.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 26, 2011
  1. Yusuke Endoh

    * vm_insnhelper.c (unknown_keyword_error): make it kind a error messa…

    mame authored
    …ge when unknown keyword is given. It require more work. See [ruby-core:40518] and [ruby-core:40541] in detail.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Yusuke Endoh

    * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments), …

    mame authored
    …iseq.c (rb_iseq_parameters), vm_insnhelper.c (vm_callee_setup_arg_complex): support Method#parameters for keyword arguments. The provisional spec is what Benoit Daloze proposed. [ruby-core:40518]
    
    * test/ruby/test_keyword.rb: add a test for above.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. Yusuke Endoh

    * vm_core.h (struct rb_iseq_struct), compile.c (iseq_set_arguments, i…

    mame authored
    …seq_compile_each), vm_insnhelper.c (vm_callee_setup_arg_complex): implement keyword arguments. See [ruby-core:40290] The feature is promised to be included in 2.0, but the detail spec is still under discussion; this commit is a springboard for further discussion. Please try it and give us feedback. This commit includes fixes for some problems reported by Benoit Daloze <eregontp AT gmail.com> [ruby-core:40518] and Marc-Andre Lafortune <ruby-core-mailing-list AT marc-andre.ca> [ruby-core:41772].
    
    * iseq.c (iseq_free, prepare_iseq_build): bookkeeping.
    
    * test/ruby/test_keyword.rb: add tests for keyword arguments.
    
    * test/ripper/dummyparser.rb (class DummyParser): temporal fix for
      ripper test.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 12, 2011
  1. Nobuyoshi Nakada

    * vm_insnhelper.c (vm_yield_setup_block_args): splat single

    nobu authored
      argument if optinal arguments are defined not only mandatory or
      post arguments.  [ruby-core:41557] [Bug #5730]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34020 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Dec 5, 2011
  1. Nobuyoshi Nakada

    * bignum.c (big_rshift), compile.c (validate_label,

    nobu authored
      iseq_build_from_ary_exception), cont.c (cont_capture), dir.c
      (dir_open_dir), gc.c (objspace_each_objects), io.c (pipe_open)
      (rb_io_advise), parse.y (parser_compile_string)
      (rb_parser_compile_file), proc.c (binding_free), process.c
      (rb_proc_exec_n, rb_seteuid_core, proc_setegid, rb_setegid_core)
      (p_uid_exchange, p_gid_exchange), regparse.c (strdup_with_null),
      signal.c (sig_dfl), vm.c (rb_iseq_eval, rb_iseq_eval_main),
      vm_insnhelper.c (vm_expandarray): suppress
      unused-but-set-variable warnings.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 27, 2011
  1. Aaron Patterson

    * vm_insnhelper.c (vm_call_cfunc): adding back useless hack. For some

    tenderlove authored
      reason, this fixes CFP errors on OS X 10.7.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 6, 2011
  1. Kazuhiro NISHIYAMA

    fix typos

    znz authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Nobuyoshi Nakada

    * vm_eval.c (make_no_method_execption): extract from

    nobu authored
      raise_method_missing().
    * vm_eval.c (send_internal): remove inadvertent symbol creation
      from public_send.  based on a patch by Jeremy Evans <code AT
      jeremyevans.net> in [ruby-core:38576]. [Feature #5112]
    * vm_insnhelper.c (vm_call_method): remove inadvertent symbol
      creation from send and __send__, too.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Oct 5, 2011
  1. NARUSE, Yui

    * vm_insnhelper.c (vm_call_cfunc): remove useless hack.

    nurse authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 29, 2011
  1. Nobuyoshi Nakada

    * use RB_TYPE_P which is optimized for constant types, instead of

    nobu authored
      comparison with TYPE.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 21, 2011
  1. Nobuyoshi Nakada

    * vm_insnhelper.c (vm_call_cfunc): suppress a warning. note that

    nobu authored
      `volatile type *var' doesn't make var itself volatile.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33309 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 20, 2011
  1. NARUSE, Yui

    Avoid cfp consistency error by LLVM.

    nurse authored
    volatile is not enough.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Nobuyoshi Nakada

    * vm_insnhelper.c (vm_get_cvar_base): reduce duplicated checks and

    nobu authored
      move a warning outside the loop.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 2, 2011
  1. Nobuyoshi Nakada

    * vm_insnhelper.c (vm_search_const_defined_class): search

    nobu authored
      ancestors only when global scope.  [ruby-core:39227] [Bug #5264]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Sep 1, 2011
  1. Nobuyoshi Nakada

    * insns.def (defineclass), vm_insnhelper.c (vm_get_cvar_base): see

    nobu authored
      also inherited constants for classes without superclass and
      modules.  [ruby-core:37698] [Bug #3423]
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 31, 2011
  1. * Re-apply r33078, thread-safe autoload which is reverted at r33093.

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

    * vm_insnhelper.c (vm_call_cfunc): revert r33112. RB_GC_GUARD macro

    unak authored
      protect a VALUE from GC.  It's not for general anti-optimizing
      purpose.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 29, 2011
  1. NARUSE, Yui

    Use RB_GC_GUARD.

    nurse authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 27, 2011
  1. * Revert r33078. It caused a Rails application NoMethodError.

    authored
      /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/utils.rb:157: warning: toplevel constant ScanError referenced by Regin::Parser::ScanError
      /home/nahi/git/emptyApp/ruby/1.9.1/gems/rack-mount-0.6.14/lib/rack/mount/vendor/regin/regin/parser.rb:17:in `parse_regexp': undefined method `scan_str' for #<Regin::Parser:0x00000002344548> (NoMethodError)
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 26, 2011
  1. * variable.c: Make autoload thread-safe. See #921.

    authored
      What's the problem?
        autoload is thread unsafe. When we define a constant to be
        autoloaded, we expect the constant construction is invariant. But
        current autoload implementation allows other threads to access the
        constant while the first thread is loading a file.
    
      What's happening inside?
        The current implementation uses Qundef as a marker of autoload in
        Constant table. Once the first thread find Qundef as a value at
        constant lookup, it starts loading a defined feature. Generally a
        loaded file overrides the Qundef in Constant table by module/class
        declaration at very beginning lines of the file, so other threads
        can see the new Module/Class object before feature loading is
        finished. It breaks invariant construction.
    
      How to solve?
        To ensure invariant constant construction, we need to override
        Qundef with defined Object after the feature loading. For keeping
        Qundef in Constant table, I expanded autoload_data struct in
        Module to have a slot for keeping the defined object while feature
        loading. And changed Module's constant lookup/update logic a
        little so that the slot is only visible from the thread which
        invokes feature loading. (== the first thread which accessed the
        autoload constant)
    
      Evaluation?
        All test passes (bootstrap test, test-all and RubySpec) and added
        8 tests for threading behavior. Extra logics are executed only
        when Qundef is found, so no perf drop should happen except
        autoloading.
    
    * variable.c (rb_autoload): Prepare new autoload_data struct.
    
    * variable.c (rb_autoload_load): Load feature and update Constant
      table after feature loading is finished. 
    
    * variable.c (rb_const_get_0): When the fetched constant is under
      autoloading, it returns the object only for the thread which starts
      autoloading.
    
    * variable.c (rb_const_defined_0): Ditto.
    
    * variable.c (rb_const_set): When the specified constant is under
      autoloading, it sets the object only for the thread which starts
      autoloading. Otherwise, simply overrides Qundef with constant
      override warning.
    
    * vm_insnhelper.c (vm_get_ev_const): Apply same change as
      rb_const_get_0 in variable.c.
    
    * test/ruby/test_autoload.rb: Added tests for threading behavior.
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Aug 24, 2011
  1. Koichi Sasada

    * vm_insnhelper.h, vm_insnhelper.c, vm.c, vm_method.c, insns.def:

    ko1 authored
      Manage a redefinition of special methods for each classes.
      A patch from Joel Gouly <joel.gouly@gmail.com>.  Thanks!
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Koichi Sasada

    * iseq.h, iseq.c, compile.c: Change the line number data structure

    ko1 authored
      to solve an issue reported at [ruby-dev:44413] [Ruby 1.9 - Bug #5217].
      Before this fix, each instruction has an information including
      line number (iseq::iseq_insn_info_table).  Instead of this data
      structure, recording only line number changing places
      (iseq::iseq_line_info_table).
      The order of entries in iseq_line_info_table is ascending order of
      iseq_line_info_table_entry::position.  You can get a line number
      by an iseq and a program counter with this data structure.
      This fix reduces memory consumption of iseq (bytecode).
      On my measurement, a rails application consumes 21.8MB for
      iseq with this fix on the 32bit CPU.  Without this fix, it
      consumes 24.7MB for iseq [ruby-dev:44415].
    * proc.c: ditto.
    * vm_insnhelper.c: ditto.
    * vm_method.c: ditto.
    * vm.c (rb_vm_get_sourceline): change to use rb_iseq_line_no().
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 22, 2011
  1. kosaki

    * vm_insnhelper.c (vm_call_cfunc): added volatile for a workaround

    kosaki authored
      of cfp consistency error problem on OS X 10.7 (Lion). It's
      suspected llvm optimization bug.
      [Bug #5076] [ruby-dev:44185]
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32628 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jul 10, 2011
  1. Koichi Sasada

    * vm_insnhelper.c (vm_throw): check a class frame.

    ko1 authored
      Fixes Bug #4648.
      The patch is contributed by Kazuki Tsujimoto.
    * bootstraptest/test_proc.rb: add tests for above.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 30, 2011
  1. Koichi Sasada

    * vm_insnhelper.c (vm_getivar): check vm state version

    ko1 authored
      to invalidate inline chache (ivar index).
      fixes Bug #4926.
    * vm_insnhelper.c (vm_setivar): ditto.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32347 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Koichi Sasada

    * vm_insnhelper.c (vm_call_bmethod): fix to hook call/return event

    ko1 authored
      for methods defined by define_method().
    * thread.c (call_trace_proc): Fix to skip if class is not given (0).
      Note that ID and Class object are passed for call/return event
      if the called method was defined by define_method().
      If you are author of tracer/profiler/debugger, this may be an
      important change.  You should check passed class as zero or
      non-zero instead of checking the event type.
    * test/ruby/test_settracefunc.rb: add a test for above.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32334 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 25, 2011
  1. nagachika

    * vm_insnhelper.c (vm_search_superclass): avoid control frame

    nagachika authored
      stack overrun. currently super() in Proc created in a method
      defined by Module#define_method raise NoMethodError. [Bug #4881]
    * test/ruby/test_method.rb t_super_in_proc_from_define_method):
      add test for it.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 22, 2011
  1. NARUSE, Yui

    * cont.c (cont_capture): add volatile.

    nurse authored
      On clang -O, it is needed to avoid the optimization.
      With this and llvm/clang's recent fix, clang 3.0 can
      build ruby-trunk with -O option.
    
    * cont.c (cont_capture): use for-loop.
    
    * array.c (rb_ary_each): add volatile and use it.
    
    * vm_insnhelper.c (vm_call_cfunc): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32201 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 18, 2011
  1. akr

    * method.h, internal.h iseq.h: declare internal functions.

    akr authored
    * compile.c, eval.c, iseq.c, object.c, parse.y, proc.c, process.c,
      thread.c, vm.c, vm_eval.c, vm_insnhelper.c, vm_method.c: don't
      declare internal functions.
    
      Note that rb_method_entry_eq() is defined in vm_method.c but
      there was a declaration in proc.c with different const-ness.
      Now it is declared in method.h with same const-ness to the
      definition.
    
    * object.c (rb_mod_module_exec): don't declare functions declared in
      include/ruby/intern.h.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Jun 16, 2011
  1. kosaki

    * thread.c (rb_thread_schedule_rec): fix {UN,}LIKELY macro misuse.

    kosaki authored
    * gc.c (rb_newobj): ditto.
    * vm_insnhelper.c (vm_method_search): ditto.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 18, 2011
  1. Nobuyoshi Nakada

    * internal.h: add for internal use only.

    nobu authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31627 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Mar 31, 2011
  1. Shugo Maeda

    * vm_insnhelper.c (vm_get_ev_const): should ignore crefs with

    shugo authored
      the NODE_FL_CREF_PUSHED_BY_EVAL flag.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. Shugo Maeda

    * vm_insnhelper.c (vm_get_ev_const): search root cref properly.

    shugo authored
      [ruby-dev:43365]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on Mar 24, 2011
  1. Nobuyoshi Nakada

    * vm_insnhelper.c (vm_get_ev_const): should not autoload in

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