Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on May 30, 2015
  1. * properties.

    svn authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. variable.c: avoid compatibility table with generic ivars

    normal authored
    This recovers and improves performance of Marshal.dump/load on
    Time objects compared to when we implemented generic ivars
    entirely using st_table.
    
    This also recovers some performance on other generic ivar objects,
    but does not bring bring Marshal.dump/load performance up to
    previous speeds.
    
    benchmark results:
    minimum results in each 10 measurements.
    Execution time (sec)
    		name    trunk   geniv   after
    marshal_dump_flo        0.343   0.334   0.335
    marshal_dump_load_geniv 0.487   0.527   0.495
    marshal_dump_load_time  1.262   1.401   1.257
    
    Speedup ratio: compare with the result of `trunk' (greater is better)
    		name    geniv   after
    marshal_dump_flo        1.026   1.023
    marshal_dump_load_geniv 0.925   0.985
    marshal_dump_load_time  0.901   1.004
    
    * include/ruby/intern.h (rb_generic_ivar_table): deprecate
    * internal.h (rb_attr_delete): declare
    * marshal.c (has_ivars): use rb_ivar_foreach
      (w_ivar): ditto
      (w_object): update for new interface
    * time.c (time_mload): use rb_attr_delete
    * variable.c (generic_ivar_delete): implement
      (rb_ivar_delete): ditto
      (rb_attr_delete): ditto
      [ruby-core:69323] [Feature #11170]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. @nobu

    cont.c: Check ruby_current_thread

    nobu authored
    * cont.c (cont_free): check if ruby_current_thread is still valid.
      [Fix GH-914]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 29, 2015
  1. variable.c: use indices for generic ivars

    normal authored
    This reduces memory overhead of ivars for common types such as
    T_DATA the same way T_OBJECT does it.
    
    For 9992 accepted clients on an OpenSSL server, this reduces
    memory from 77160K to 69248K with the script in
    https://bugs.ruby-lang.org/issues/11170
    
    * variable.c (static int special_generic_ivar): move
      (rb_generic_ivar_table): rewrite for compatibility
      (gen_ivtbl_bytes): new function
      (generic_ivar_get): update to use ivar index
      (generic_ivar_update): ditto
      (generic_ivar_set): ditto
      (generic_ivar_defined): ditto
      (generic_ivar_remove): ditto
      (rb_mark_generic_ivar): ditto
      (givar_i): ditto
      (rb_free_generic_ivar): ditto
      (rb_mark_generic_ivar_tbl): ditto
      (rb_generic_ivar_memsize): ditto
      (rb_copy_generic_ivar): ditto
      (rb_ivar_set): ditto
      (rb_ivar_foreach): ditto
      (rb_ivar_count): ditto
      (givar_mark_i): remove
      (gen_ivtbl_mark): new function
      (gen_ivar_each): ditto
      (iv_index_tbl_extend): update for struct ivar_update
      (iv_index_tbl_newsize): ditto
      [ruby-core:69323] [Feature #11170]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  2. * 2015-05-30

    svn authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. variable.c: extract common functions for generic ivar indices

    normal authored
    * variable.c (iv_index_tbl_make): extract from rb_ivar_set
      (iv_index_tbl_extend): ditto
      (iv_index_tbl_newsize): ditto
      (rb_ivar_set): use extracted functions
      [ruby-core:69323] (Part 1)
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  4. * properties.

    svn authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  5. @ko1

    * tool/make_hgraph.rb: added.

    ko1 authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  6. @nobu

    openssl: wrapper object before alloc

    nobu authored
    * ext/openssl: make wrapper objects before allocating structs to
      get rid of potential memory leaks.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  7. @nobu

    psych: allocate structs with wrapper

    nobu authored
    * ext/psych/psych_emitter.c (allocate): allocate structs with
      making new wrapper objects and get rid of potential memory leak.
    
    * ext/psych/psych_parser.c (allocate): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  8. @nobu

    parse.y: check NTH_REF range

    nobu authored
    * compile.c (iseq_compile_each): out of range NTH_REF is always
      nil.
    * parse.y (parse_numvar): check overflow of NTH_REF and range.
      [ruby-core:69393] [Bug #11192]
    * util.c (ruby_scan_digits): make public and add length parameter.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  9. socket: avoid redundant fcntl on Linux

    normal authored
    * ext/socket/ancdata.c (bsock_sendmsg_internal,
      bsock_recvmsg_internal):
      avoid redundant fcntl on Linux
      [ruby-core:69154] [Feature #11145]
    * ext/socket/init.c (rsock_s_recvfrom_nonblock): ditto
    * ext/socket/rubysocket.h (MSG_DONTWAIT_RELIABLE): new macro
    
    MSG_DONTWAIT is enough to force non-blocking I/O under Linux,
    so avoid changing the state of a socket.  This will allow certain
    threads to do a non-destructive non-blocking "peek" while others
    block (without relying on an extra ppoll syscall).
    
    We shall be conservative about enabling this feature since some
    OSes may have incomplete support for MSG_DONTWAIT.  I shall
    defer to a FreeBSD expert to enable that for FreeBSD.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  10. ChangeLog: add missing reference [ci skip]

    normal authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50665 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  11. lib/*: use monotonic clock for timeouts

    normal authored
    The monotonic clock is preferred as it is guaranteed to be
    continuous and not subject to jumps due to adjustments.
    
    * lib/net/resolv.rb (request): use monotonic clock
    * lib/net/http.rb (begin_transport, end_transport): ditto
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 28, 2015
  1. * 2015-05-29

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

    * ext/objspace/objspace.c: add two methods to debug internals.

    ko1 authored
      * ObjectSpace.internal_class_of: return RBASIC_CLASS(obj).
      * ObjectSpace.internal_super_of: return RCLASS_SUPER(cls).
    * NEWS: add information about both methods.
    * test/objspace/test_objspace.rb: add tests for both methods.
    
    
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. @nobu

    generator.c: allocate structs with wrapper

    nobu authored
    * ext/json/generator/generator.c (cState_s_allocate): allocate
      structs with making new wrapper objects and get rid of potential
      memory leak.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  4. @nobu

    parser.rl: allocate structs with wrapper

    nobu authored
    * ext/json/parser/parser.rl (cJSON_parser_s_allocate): allocate
      structs with making new wrapper objects and get rid of potential
      memory leak.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50660 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  5. @nobu

    win32ole.c: wrapper object before alloc

    nobu authored
    * ext/win32ole/win32ole.c (Init_win32ole): make wrapper object
      before making st_table.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  6. @nobu

    tcltklib.c: allocate structs with wrapper

    nobu authored
    * ext/tk/tcltklib.c (ip_create_slave_core): allocate structs with
      making new wrapper objects and get rid of potential memory leak.
    
    * ext/tk/tkutil/tkutil.c (allocate_cbsubst_info): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  7. @nobu

    tkutil.c: check arguments type

    nobu authored
    * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): check arguments
      type.  implicit conversion is disabled to get rid of method
      calls which can modify other arguments.
    
    * ext/tk/tkutil/tkutil.c (cbsubst_table_setup): ditto.
    
    * ext/tk/tkutil/tkutil.c (cbsubst_scan_args): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50657 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  8. @nobu

    tkutil.c: check type

    nobu authored
    * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_key): ensure the
      result type of a method call to be an array before accessing by
      RARRAY macros.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 27, 2015
  1. * 2015-05-28

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

    Fix typo in samples for tk ext [skip ci]

    nobu authored
    * ext/tk/sample/figmemo_sample.rb (open_file),
      ext/tk/sample/tktextio.rb (TkTextIO): fix typo in messages.
      [Fix GH-916]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  3. @nobu

    tcltklib.c: fix memory leak

    nobu authored
    * ext/tk/tcltklib.c (ip_init): reject already initialized
      interpreter to fix memory leak.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  4. @nobu

    test_bigdecimal.rb: adjust

    nobu authored
    * test/bigdecimal/test_bigdecimal.rb (assert_no_memory_leak): fix
      GC scope and adjust limits.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50651 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  5. @nobu

    bigdecimal.c: wrapper object before alloc

    nobu authored
    * ext/bigdecimal/bigdecimal.c (VpNewRbClass): make wrapper object
      before result structs allocation and manage refcount for each
      elements to get rid of potential memory leak.
    
    * ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50650 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  6. @nobu

    envutil.rb: EnvUtil.gc_stress_to_class

    nobu authored
    * test/lib/envutil.rb (EnvUtil.gc_stress_to_class): check if
      GC.stress_to_class is available.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  7. @nobu

    gc.c: mark stress_to_class

    nobu authored
    * gc.c (gc_mark_roots): stress_to_class is also a GC root.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  8. @nobu

    gc.c: stress_to_class

    nobu authored
    * gc.c (newobj_of): debug feature to fail allocation of particular
      classes.
    
    * gc.c (rb_gcdebug_add_stress_to_class): add classes to the list.
    
    * gc.c (rb_gcdebug_remove_stress_to_class): remove classes from
      the list.
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  9. openssl: use RB_GC_GUARD instead of volatile

    normal authored
    From doc/extension.rdoc:
    >
    > Using the RB_GC_GUARD macro is preferable to using the "volatile"
    > keyword in C.  RB_GC_GUARD has the following advantages:
    >
    > 1) the intent of the macro use is clear
    >
    > 2) RB_GC_GUARD only affects its call site, "volatile" generates some
    >    extra code every time the variable is used, hurting optimization.
    >
    > 3) "volatile" implementations may be buggy/inconsistent in some
    >    compilers and architectures. RB_GC_GUARD is customizable for broken
    >    systems/compilers without those without negatively affecting other
    >    systems.
    
    * ext/openssl/ossl_asn1.c (ossl_asn1_traverse, ossl_asn1_decode,
      ossl_asn1_decode_all): use RB_GC_GUARD instead of volatile
      [ruby-core:69371] [Bug #11185]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  10. drb: avoid redundant fcntl call

    normal authored
    Sockets are close-on-exec by default since Ruby 2.0, so it
    is redundant to set it again.
    
    * lib/drb/drb.rb (set_sockopt): remove redundant fcntl call
    * lib/drb/unix.rb (set_sockopt): ditto
      [ruby-core:69128] [Feature #11137]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  11. * 2015-05-27

    svn authored
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50644 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  12. @nobu

    ossl_asn1.c: [DOC] Fix typo [skip ci]

    nobu authored
    * ext/openssl/ossl_asn1.c (Init_ossl_asn1): [DOC] Fix typo
      "recieved" to "received".  [Fix GH-913]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Commits on May 26, 2015
  1. @shugo

    * vm_method.c (rb_alias): should resolve refined methods.

    shugo authored
      [ruby-core:69360] [Bug #11182]
    
    git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Something went wrong with that request. Please try again.