aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* debug_counter.c: debug_counter_names [ci skip]nobu2017-03-104-38/+32
| | | | | | | | | | * debug_counter.c (debug_counter_names): stringize debug counter names by preprocessor. * debug_counter.h (RB_DEBUG_COUNTER): define counter names outside the include guard, to expand multiple times. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.in: RUBY_SO_NAME as --with-sonamenobu2017-03-101-7/+17
| | | | | | | | | | * configure.in (RUBY_SO_NAME): [EXPERIMENTAL] use the given name literally if --with-soname is specified. [ruby-core:79972] [Misc #13296] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-03-10svn2017-03-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: [DOC] simplify Object#tap examplestomar2017-03-091-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbconfig/sizeof: remove VPATHnobu2017-03-091-2/+2
| | | | | | * ext/rbconfig/sizeof/depend: remove VPATH for `make dist`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/raddrinfo.c (addrinfo_mark): avoid needless branchnormal2017-03-091-4/+2
| | | | | | | gc.c (gc_mark_children, case T_DATA) does not use the dmark function pointer if DATA_PTR is NULL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* goruby.c: FD leak [ci skip]nobu2017-03-091-1/+6
| | | | | | * goruby.c (goruby_options): fix potential FD leak. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbconfig/sizeof: nmake VPATHnobu2017-03-091-4/+6
| | | | | | | * ext/rbconfig/sizeof/depend: prepend VPATH for out-of-place build using nmake. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* revert RB_FIXABLE related changesets [Bug #13288][Bug #13293][Bug #13294]shyouhei2017-03-098-41/+38
| | | | | | | | | This commit is auto-generated using following command: svn diff -r57807:57788 include internal.h bignum.c numeric.c compile.c insns.def object.c sprintf.c | patch -p0 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix UTF-32 valid_encoding?nobu2017-03-091-2/+2
| | | | | | | * test/ruby/test_io_m17n.rb (TestIO_M17N#test_puts_widechar): do not use invalid codepoint. [ruby-core:79966] [Bug #13292] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix UTF-32 valid_encoding?nobu2017-03-094-6/+101
| | | | | | | | | | | | * enc/utf_32be.c (utf32be_mbc_enc_len): check arguments precisely. [ruby-core:79966] [Bug #13292] * enc/utf_32le.c (utf32le_mbc_enc_len): ditto. * regenc.h (UNICODE_VALID_CODEPOINT_P): predicate for valid Unicode codepoints. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57816 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_utf16.rb: refine valid_encoding testsnobu2017-03-091-50/+62
| | | | | | | | | | * test/ruby/enc/test_utf16.rb (test_utf16be_valid_encoding): assert all data and use assert_predicate. * test/ruby/enc/test_utf16.rb (test_utf16le_valid_encoding): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* make commit [ci skip]nobu2017-03-091-1/+15
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c (str_uminus): update doc for deduplicationnormal2017-03-081-2/+2
| | | | | | As of r57698, String#-@ can return pre-existing strings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-03-09svn2017-03-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* docs for FileUtils.ln methodsstomar2017-03-081-33/+37
| | | | | | | | | | | | * lib/fileutils.rb: [DOC] add clarifying call-seq's for FileUtil.ln, ln_s, and ln_sf, with better argument names for the created link and link target. Reported by Mike Vastola. [ruby-core:62532] [Bug #9829] * lib/fileutils.rb: [DOC] further improve descriptions of FileUtils.ln and related methods; improve examples: relative links probably won't work in other dir, avoid `include', use more generic homedir name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* great lovenobu2017-03-082-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix parennobu2017-03-081-1/+1
| | | | | | * string.c (str_byte_substr): fix misplaced parenthesis at r56155. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: preserve class name encoding in Proc#to_snobu2017-03-082-17/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re-introduce __builtin_add_overflowshyouhei2017-03-083-25/+20
| | | | | | | | | | | | | r57789 (74cdd89) was gradually "improve"d by naruse through r57793 to r57806, resulted in reverting the efect of r57789 while retaining its complexity. I think the current situation is slightly worse than before (same output complicated source code). Here I introduce __builtin_add_overflow again, which (I think) is what naruse wanted to do in r57793. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Always use old RB_FIXABLE to allow double as argumentnaruse2017-03-071-5/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r57803 "Avoid to cast the argument"naruse2017-03-071-1/+1
| | | | | | __builtin_add_overflow doesn't support double. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-03-08svn2017-03-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Avoid to cast the argumentnaruse2017-03-071-1/+1
| | | | | | For 32bit environment and __int128 use cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57803 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: [DOC] Fix a typo in String#dumpkazu2017-03-071-1/+1
| | | | | | | [Fix GH-1531][ci skip] Author: Alex Semyonov <alex@semyonov.us> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57802 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: remove tracenobu2017-03-072-1/+10
| | | | | | | | * parse.y (reg_named_capture_assign_iter): do not insert trace instructions before local variable assinments. putobject is expected at first. [ruby-core:79940] [Bug #13287] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: negation of LONG_MINnobu2017-03-072-2/+6
| | | | | | | * string.c (rb_str_update): do not use negation of LONG_MIN, which is negative too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix integer overflownobu2017-03-071-1/+1
| | | | | | | | | * string.c (str_byte_substr): fix another integer overflow which can happen only when SHARABLE_MIDDLE_SUBSTRING is enabled. [ruby-core:79951] [Bug #13289] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use RB_POSFIXABLE and RB_NEGFIXABLE to avoid cast introduced at r57793naruse2017-03-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: fix integer overflownobu2017-03-071-1/+1
| | | | | | | | * string.c (rb_str_subpos): fix integer overflow which can happen only when SHARABLE_MIDDLE_SUBSTRING is enabled. incorpolate https://github.com/mruby/mruby/commit/7db0786abdd243ba031e24683f git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warning: shadowing outer local variable - enaruse2017-03-071-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57796 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Supress warning: instance variable @repeat_count not initializednaruse2017-03-071-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix up r57788, Function is removed at readline-6.3.hsbt2017-03-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use ADD instead of MULnaruse2017-03-072-22/+5
| | | | | | | | | | | | | | | | * On recent CPUs, 2-operand MUL's latency is 3 cycle but ADD is 1 cycle. * clang Optimizes `MUL rax,2` into `ADD rax,rax` but gcc7 doesn't. * LONG2FIX is compiled into `lea r14,[r15+r15*1+0x1]`; this is 1cycle and run in parallel if the branch prediction is correct. * Note that old (RB_POSFIXABLE(f) && RB_NEGFIXABLE(f)) is usually uses following instructions. * movabs rax,0x4000000000000000 * add rax,rdi * js It needs large immediate and Macro-Fusion is not applied. ADD and JO is much smaller though it is also Macro-Fusion unfriendly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix macro namenobu2017-03-071-2/+2
| | | | | | | | | | * tool/instruction.rb (VmBodyGenerator#make_header_prepare_stack): REG_CFP has been prefixed with VM_ at r56609. [Bug #12527] * tool/instruction.rb (VmBodyGenerator#make_footer_stack_val): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-03-07svn2017-03-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* io.c: [DOC] open mode can be an integer; fix rdoc syntaxstomar2017-03-061-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* optimize FIXABLE macroshyouhei2017-03-068-42/+71
| | | | | | | | | | | | Looking at the source code, FIXABLE tends to be just before LOING2FIX to check applicability of that operation. Why not try computing first then check for overflow, which should be optimial. I also tried the same thing for unsigned types but resulted in slower execution. It seems RB_POSFIXABLE() is fast enough on modern CPUs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Avoid to warning of clang with -Wincompatible-pointer-types.hsbt2017-03-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* readline.c: fix waiting fucntionnobu2017-03-061-1/+1
| | | | | | | * ext/readline/readline.c (getc_body): use rb_w32_wait_events_blocking in block region. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57787 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* LONG_LONG_MAX not always availableshyouhei2017-03-061-1/+1
| | | | | | | | | I was not aware of cases when LONG_LONG_MAX is undefined. Sorry. Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* opt_eq_func refactornobu2017-03-063-24/+24
| | | | | | | | | | * vm_insnhelper.c (opt_eq_func): method to dispatch is resolved by only the receiver's class, not including the argument class. even if basic operation is redefined, other class conditions never meet. optimize Float and non-Float case, delegate to rb_float_equal directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57785 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use HAVE_BUILTIN___BUILTIN_MUL_OVERFLOWshyouhei2017-03-063-4/+32
| | | | | | | | | | | | | | | | | | | We already check for __builtin_mul_overflow in configure but never actually referred it before. Why not call it if available, because that should render supposedly-optimial assembly outputs. Optionally if __builtin_mul_overflow_p is available, which is the case for recent GCC, use that to detect fixnum overflow. This is much faster than the previous. On my machine generated assembly of numeric.c:int_pow reduces from 480 to 448 bytes, according to nm(1). Also on my machine, following script boosts from 7.819 to 6.929 sec. time ./miniruby -e 'i=0; while i < 30_000_000 do i += 1; 7 ** 23; end' Signed-off-by: Urabe, Shyouhei <shyouhei@ruby-lang.org> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: variable typenobu2017-03-051-1/+1
| | | | | | | | * compile.c (iseq_compile_each): fix variable type, use VALUE for Symbol. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?revision=57772&view=revision git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2017-03-06svn2017-03-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* docs for IO.{write,read}stomar2017-03-051-32/+35
| | | | | | | | | | | | * io.c: [DOC] improve docs for IO * IO.{write,read}: fix errors (:open_args is not an array of strings, it might include a perm or options hash argument; IO.write has no length argument, drop corresponding statement), improve formatting, call-seq, grammar. * IO#sync=: remove unnecessary "produces no output". * other improvements. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* docs for IO#printstomar2017-03-051-10/+12
| | | | | | | | * io.c: [DOC] split documentation for IO#print into smaller paragraphs, delete duplicate sentence, fix call-seq. Based on a patch by Dario Daic. [ruby-core:78291] [Bug #12975] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: more accuracynobu2017-03-051-1/+1
| | | | | | | * math.c (math_log10): calculate log10(2) for more accuracy. [ruby-core:79907] [Bug #13279] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: [DOC] fix doc formatting for String#==, #===stomar2017-03-041-3/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc for String classstomar2017-03-041-0/+2
| | | | | | | * lib/unicode_normalize.rb: [DOC] prevent a comment from showing up in the class documentation for String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e