summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-07Supress warning: instance variable @repeat_count not initializednaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07Fix up r57788, Function is removed at readline-6.3.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-07Use ADD instead of MULnaruse
* 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
2017-03-07fix macro namenobu
* 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-06* 2017-03-07svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06io.c: [DOC] open mode can be an integer; fix rdoc syntaxstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06optimize FIXABLE macroshyouhei
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
2017-03-06Avoid to warning of clang with -Wincompatible-pointer-types.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-06readline.c: fix waiting fucntionnobu
* 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
2017-03-06LONG_LONG_MAX not always availableshyouhei
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
2017-03-06opt_eq_func refactornobu
* 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
2017-03-06use HAVE_BUILTIN___BUILTIN_MUL_OVERFLOWshyouhei
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
2017-03-05compile.c: variable typenobu
* 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-05* 2017-03-06svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-05docs for IO.{write,read}stomar
* 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
2017-03-05docs for IO#printstomar
* 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
2017-03-05math.c: more accuracynobu
* 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
2017-03-04string.c: [DOC] fix doc formatting for String#==, #===stomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04rdoc for String classstomar
* 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
2017-03-04* 2017-03-05svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04nodoc OptParsestomar
* lib/optparse.rb: [DOC] nodoc OptParse, introduced with r46126, to avoid leaking of its documentation (OptionParser's docs) into the class documentation of Object. [ruby-core:79909] [Bug #13281] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04compile.c: operand size checknobu
* compile.c (ibf_load_code): raise an exception on invalid operand size. should not use assert() to validate incoming data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04compile.c: memory leaknobu
* compile.c (iseq_set_sequence): fix potential memory leaks on an invalid instruction sequence. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04compile.c: fix invalid label messagenobu
* compile.c (validate_label): fix invalid label message. registered labels are Symbols, not IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04documentation for sort methodsstomar
* array.c: [DOC] fix grammar in Array#sort, #sort!, #sort_by!, move references below the code example, add a missing reference. * enum.c: [DOC] fix grammar in Enumerable#sort, #sort_by. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04enum.c: documentation for Enumerable#sort_bystomar
* enum.c: [DOC] improve structure of docs for Enumerable#sort_by, adopt explanation of the comparison block from Array#sort_by, drop mention of 1.8, fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-04readline.c: fix typenobu
* ext/readline/readline.c (getc_body): fix variable type, and extract _get_osfhandle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03* 2017-03-04svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03io.c: documentation for putsstomar
* io.c: [DOC] clarify that the 'record separator' between arguments passed to 'puts' is always a newline. Based on a patch by Mark Amery. [ruby-core:65801] [Misc #10403] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03zlib for mingwnobu
* ext/zlib/extconf.rb: fix building zlib for mingw, and for cross-compiling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03proc.c: documentation for Proc#{call,yield,[]}stomar
* proc.c: [DOC] fix and improve docs for Proc#{call,yield,[]}: * change order of Document-method directives as workaround for an RDoc rendering problem where the documentation for Proc#call displays a "Document-method: []" code block. [ruby-core:79887] [Bug #13273] * add missing call-seq and example for Proc#yield * remove pointless cross reference to Proc#yield * update description for handling of extra or missing arguments, improve examples and add cross reference to #lambda? git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03MINIRUBY for cross-complingnobu
* template/configure-ext.mk.tmpl (EXTMK_ARGS): add MINIRUBY for cross-compling, which is used in extmk.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03fix for mingw64nobu
* util.c: define MINGW_HAS_SECURE_API for qsort_s on recent mingw64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-03broken mingwnobu
* configure.in: check whether frexp and modf are broken. * include/ruby/win32.h (frexp, modf): ignore bad declarations when compiling as C++. [ruby-core:79859] [Bug #13267] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02[DOC] update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02* 2017-03-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02refine a warning message.akr
The "n" option for regexp, /.../n, is historical. It doesn't mean the regexp works as binary match since Ruby 1.9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02string.c: restore documentation for String#<<stomar
* string.c: [DOC] restore documentation for String#<< which became undocumented with r56021; fix a typo. [ruby-core:79865] [Bug #13268] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02test: use RbConfig::Limitsnobu
* test/lib/envutil.rb: rbconfig/sizeof may not be available when cross-compiling. use RbConfig::Limits instead of calculating limits of Fixnum with hard-coded CHAR_BIT. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-02fix for cross-compilingnobu
* common.mk (test-rubyspec): add dependency for cross-compiling. * defs/gmake.mk: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01struct.c: improve rdoc for Structstomar
* struct.c: [DOC] improve examples for ::new, improve #dig example, simplify #select example, use consistent style for return values, fix typos and example code style, remove duplicate cross reference. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01* 2017-03-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01hash.c: [DOC] fix book title in examplestomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01lib/e2mmap.rb: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01fileutils.rb: improve rdoc for FileUtilsstomar
* lib/fileutils.rb: [DOC] fix invalid example code to make it syntax highlighted, fix rdoc for lists, nodoc internal methods, avoid a dangerous example. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01openssl: avoid segfault during running tests on Ubuntu trustyrhe
Import the commit 6693a549d673 ("test/test_pkey_ec: do not use dummy 0 order", 2017-02-03) from upstream. Hopefully this will fix the segfault on RubyCI icc16-x64: http://rubyci.org/logs/rubyci.s3.amazonaws.com/icc-x64/ruby-trunk/log/20170301T050002Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01fileutils.rb: improve docs for FileUtils.compare_filestomar
* lib/fileutils.rb (compare_file): [DOC] clarify documentation by avoiding confusing return value of "maybe false". [ruby-core:75431] [Misc #12365] reported by Robert A. Heiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01common.mk: separate clean-extnobu
* common.mk (clean-ext): separate clean-up of makefiles and timestamps, and clean-up of subdirectories under ext and gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01zlib: clean zlibnobu
* ext/zlib/extconf.rb: clean zlib libraries generated in the place. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-01* 2017-03-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e