* encoding.c (enc_inspect): use PRIsVALUE to preserve the result
encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (enc_set_index): deal with terminator so that
rb_enc_set_index also works.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
__builtin_bswap64.
* internal.h (swap32): Use the configure result for the condition to
use __builtin_bswap32.
(swap64): Use the configure result for the condition to use
__builtin_bswap64.
* bignum.c (ones): Use the configure result for the condition to use
__builtin_popcountl.
(bary_unpack_internal): Use appropriate types for swap argument.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(bigsub_core): Removed.
(bigsub): Don't compare before subtraction. Just subtract and
get the two's complement if the subtraction causes a borrow.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
big_lshift and big_rshift are merged.
(big_shift2): New function.
(big_lshift): Use big_shift3.
(big_rshift): Ditto.
(check_shiftdown): Removed.
(rb_big_lshift): Use big_shift2 and big_shift3.
(rb_big_rshift): Ditto.
(big_lshift): Removed.
(big_rshift): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (rb_enc_associate_index): fill new terminator length, not
old one.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32: move from ext/dl and ext/fiddle. since ext/extmk.rb
builds extensions in alphabetical order, compiled?('fiddle') under
ext/dl makes no sense.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(bigrsh_bang): Ditto.
(bigmul1_toom3): Use bary_small_lshift and bary_small_rshift.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (rb_enc_associate_index): refill the terminator if it
becomes longer than before. [ruby-dev:47500] [Bug #8624]
* string.c (str_null_char, str_fill_term): get rid of out of bound
access.
* string.c (rb_str_fill_terminator): add a parameter for the length of
new terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transcode.c (str_encode_associate): fill terminator after conversion.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_enc_str_new, rb_str_set_len, rb_str_resize): fill
minimum length of the encoding as the terminator.
* string.c (str_buf_cat, rb_str_buf_append, rb_str_splice_0): ditto.
* string.c (str_make_independent_expand, rb_str_modify_expand): make
the capacity enough for multi-byte terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_string_value_cstr): fill minimum length of the encoding
as the terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (rb_string_value_cstr): check null char in char, not in
byte.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
(mulfunc_t): New type.
(bary_mul_toom3_start): Renamed from bary_mul.
(bary_mul_karatsuba_start): Renamed from bary_mul.
(bary_mul_balance_with_mulfunc): Renamed from bary_mul_balance and
new argument, mulfunc, is added.
(rb_big_mul_balance): Invoke bary_mul_balance_with_mulfunc with
bary_mul_toom3_start.
(bary_mul_karatsuba): Invoke bary_mul_karatsuba_start instead of
bary_mul.
(bary_mul_precheck): Extracted from bary_mul.
(bary_mul_karatsuba_branch): Extracted from bary_mul.
(bary_mul_karatsuba_start): New function to call bary_mul_precheck
and bary_mul_karatsuba_branch.
(bary_mul_toom3_branch): Extracted from bary_mul.
(bary_mul_toom3_start): New function to call bary_mul_precheck and
bary_mul_toom3_branch.
(bary_mul): Just call bary_mul_toom3_start.
Arguments for work memory are removed.
(rb_cstr_to_inum): Follow the bary_mul change.
(bigmul0): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tool/probes_to_wiki.rb: fix usage comment. use Enumerable#grep
which yields each elements to reduce unnecessary array.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e