aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * remove trailing spaces.nobu2013-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41581 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * class.c (rb_include_class_new), eval.c (rb_using_refinement):ko12013-06-224-3/+34
| | | | | | | | | | | | make classes/modules (who share method table) shady. If module `a' and `b' shares method table m_tbl and new method with iseq is added, then write barrier is applied only `a' or `b'. To avoid this issue, shade such classes/modules. * vm_method.c (rb_method_entry_make): add write barriers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41580 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_zero_p): Removed.akr2013-06-222-25/+20
| | | | | | | | (bary_pack): Don't call bytes_zero_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_zero_p): Extracted from bary_pack.akr2013-06-222-7/+19
| | | | | | | | (bary_pack): Use bytes_zero_p. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41578 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (MSB): New macro.akr2013-06-222-6/+14
| | | | | | | | | | (bary_unpack_internal): Use MSB. (bary_divmod): Ditto. (bigdivrem): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-06-23svn2013-06-221-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update comments.akr2013-06-221-0/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Unused code removed.akr2013-06-221-114/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_swap): New function.akr2013-06-222-30/+25
| | | | | | | | | (bary_pack): Use bary_swap. (bary_unpack_internal): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bytes_2comp): Renamed from quad_buf_complement.akr2013-06-222-129/+32
| | | | | | | | | | (bary_pack): Use bytes_2comp. (rb_quad_pack): Use rb_integer_pack. (rb_quad_unpack): Use rb_integer_unpack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (rb_integer_unpack): Don't allocate a Bignum if possible.akr2013-06-222-4/+39
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41569 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-06-221-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_unpack): Remove specialized unpackers for integers.akr2013-06-222-131/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_unpack_internal): Specialized unpacker implemented.akr2013-06-223-11/+195
| | | | | | | | | (bary_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION. (rb_integer_unpack): Support INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_pack): Supportakr2013-06-225-139/+189
| | | | | | | | | | | | INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION flag. Fix byte order and word order handling in code specialized for wordsize % SIZEOF_BDIGITS == 0. * internal.h (INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION): Defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rgengc_check_shady): add new WB miss checkingko12013-06-222-70/+162
| | | | | | | | | | | | | | | | | | | on RGENGC_CHECK_MODE >= 2. (1) Save bitmaps before marking (2) Run full marking (3) On each traceable object, (a) object was not oldgen (== newly or shady object) && (b) parent object was oldgen && (c) parent object was not remembered && (d) object was not rememberd then, it should be WB miss. This idea of this checker is by Masaya Tarui <tarui@ruby-lang.org>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (setup_passwd): revert r41560, unnecessarycharliesome2013-06-222-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41563 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (Init_etc): omit 'passwd' from definition of Etc::Passwdcharliesome2013-06-222-2/+14
| | | | | | | if HAVE_STRUCT_PASSWD_PW_PASSWD is not defined to prevent mismatch of fields and values in setup_passwd git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41562 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/dl/cfunc.c (rb_dlcfunc_call): Use rb_big_pack instead ofakr2013-06-223-6/+16
| | | | | | | | | | rb_big2ulong_pack and rb_big2ull. * include/ruby/intern.h (rb_big2ulong_pack): Deprecated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (setup_passwd): pass 0 as VALUE to rb_struct_new tocharliesome2013-06-222-1/+7
| | | | | | | prevent segfault if the compiler passes it as a 32 bit integer on a 64 bit ruby git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_pack): MEMZERO can be used even if nails is not zero.akr2013-06-222-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_getpwnam): use PRIsVALUE in format string insteadcharliesome2013-06-222-2/+9
| | | | | | | | of %s and RSTRING_PTR * ext/etc/etc.c (etc_getgrnam): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (CLEAR_LOWBITS): Rewritten without RSHIFTX.akr2013-06-222-2/+6
| | | | | | | | (RSHIFTX): Removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41557 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (num2i32): Removed.akr2013-06-222-90/+16
| | | | | | | | (pack_pack): Don't use num2i32. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* load.c: suppress warningnobu2013-06-221-2/+2
| | | | | | | * load.c (rb_load_internal): suppress clobbered-by-longjmp warning by gcc 4.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41555 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (LSHIFTX): Defined to suppress a warning.akr2013-06-222-2/+12
| | | | | | | | | | | (RSHIFTX): Ditto. (CLEAR_LOWBITS): Use LSHIFTX and RSHIFTX. (FILL_LOWBITS): Use LSHIFTX. Reported by ko1 via IRC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Imported minitest 4.7.5 (r8724)ryan2013-06-224-17/+23
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_prof_set_heap_info, after_gc_sweep): callko12013-06-212-29/+49
| | | | | | | | | | | | | | | gc_prof_set_heap_info() just after sweeping to calculate live object number correctly. (live object number = total generated number (before marking) - total freed number (after sweeping)) * gc.c (gc_marks): record `oldgen_object_count' into current profile` record directly. * gc.c (rgengc_rememberset_mark): same for remembered_normal_objects and remembered_shady_objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41552 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_objspace::profile): rename rb_objspace::profile::record toko12013-06-212-45/+51
| | | | | | | | | | | records (because it points a set of records) and add a field rb_objspace::profile::current_record to point a current profiling record. * gc.c: use above fields. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_gc_giveup_promoted_writebarrier): remove `rest_sweep()'ko12013-06-212-7/+5
| | | | | | | | because all of remembered objects are called for gc_mark_children(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41550 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rgengc_rememberset_mark): call gc_mark_children() forko12013-06-212-2/+8
| | | | | | | | remembered objects directly instead of pushing on the mark stack. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h (OBJ_WRITE): cast to (VALUE *) for secondko12013-06-2111-43/+51
| | | | | | | | | | parameter `slot'. You don't need to write a cast (VALUE *) any more. * class.c, compile.c, hash.c, iseq.c, proc.c, re.c, variable.c, vm.c, vm_method.c: remove cast expressions for OBJ_WRITE(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (slot_sweep_body): rename to slot_sweep().ko12013-06-212-53/+21
| | | | | | | | | | No need to separate major/minor GC. * gc.c (gc_setup_mark_bits): remove gc_clear_mark_bits() and unify to this function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41547 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (check_bitmap_consistency): add to check flag and bitmap consistency.ko12013-06-212-15/+35
| | | | | | | | Use this function in several places. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-06-22svn2013-06-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bary_pack): Specialized packers implemented.akr2013-06-215-40/+311
| | | | | | | | | | | | | | | | | (HOST_BIGENDIAN_P): New macro. (ALIGNOF): New macro. (CLEAR_LOWBITS): New macro. (FILL_LOWBITS): New macro. (swap_bdigit): New macro. (bary_2comp): Returns an int. * internal.h (swap16): Moved from pack.c (swap32): Ditto. (swap64): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41544 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-06-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-06-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-211-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (typedef enum): Introdule flags of major gc reason.tarui2013-06-212-40/+52
| | | | | | | | | * gc.c (garbage_collect_body): Ditto. * gc.c (gc_profile_flags): Ditto. * gc.c (gc_profile_dump_on): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (allocate_sorted_heaps): remove unused variable `add'.ko12013-06-212-2/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: constify RArray::as::ary and RArray::heap::ptr.ko12013-06-214-16/+23
| | | | | | | | | Use RARRAY_ASET() or RARRAY_PTR_USE() to modify Array objects. * array.c, gc.c: catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41537 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_eval.c (eval_string_with_cref): fix WB miss.ko12013-06-212-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-06-211-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: support write barrier protection for T_STRUCT.ko12013-06-216-80/+102
| | | | | | | | | | | | | | | | Introduce the following C APIs: * RSTRUCT_RAWPTR(st) returns pointer (do WB on your risk). The type of returned pointer is (const VALUE *). * RSTRUCT_GET(st, idx) returns idx-th value of struct. * RSTRUCT_SET(st, idx, v) set idx-th value by v with WB. And * RSTRUCT_PTR(st) returns pointer with shady operation. The type of returned pointer is (VALUE *). * struct.c, re.c, gc.c, marshal.c: rewrite with above APIs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (BDIGMAX): Use BIGRAD.akr2013-06-212-5/+13
| | | | | | | | | | | (BIGLO): Use BDIGMAX. (bigdivrem1): Ditto. (bigor_int): Ditto. (rb_big_or): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * pack.c (pack_pack): Move the implementation for 'c' directive afterakr2013-06-212-8/+20
| | | | | | | | pack_integer label. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* add a noteko12013-06-211-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h, re.c: support write barrier for T_REGEXP.ko12013-06-213-4/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (bigsub_int): Use bdigit_roomof.akr2013-06-212-5/+13
| | | | | | | | | | | (bigadd_int): Ditto. (bigand_int): Ditto. (bigor_int): Ditto. (bigxor_int): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e