aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * 2018-03-11svn2018-03-111-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* re.c: fixed escaped multibyte charnobu2018-03-112-0/+14
| | | | | | | | * re.c (unescape_nonascii): escaped multibyte character should be copied as-is, just with checking if the encoding matches. https://twitter.com/sakuro/status/972014409986883584 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: mark all ISeq ancestors as catch_except_pk0kubun2018-03-102-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change assumes that continuously reading `parent_iseq` from block ISeq would reach non-block ISeq finally. test/ruby/test_jit.rb: add test that catches 2-depth exception Combination of r62654 and r62678 caused following error in this test. -e:12:in `wrapper': Stack consistency error (sp: 14, bp: 13) (fatal) == disasm: #<ISeq:wrapper@-e:10 (10,0)-(12,3)> (catch: FALSE)=========== local table (size: 2, argc: 2 [opts: 0, rest: -1, post: 0, block: -1, kw: -1@-1, kwrest: -1]) [ 2] paths<Arg> [ 1] prefixes<Arg> 0000 putself ( 11)[LiCa] 0001 getlocal_WC_0 paths 0003 getlocal_WC_0 prefixes 0005 opt_send_without_block <callinfo!mid:catch_true, argc:2, FCALL|ARGS_SIMPLE>, <callcache> 0008 leave ( 12)[Re] As you can see, it says `catch: FALSE`, but obviously it catches exception raised from `return path`. As of r62655, it was kind of intentional because I only cared about expiration of JIT-ed frame and I've thought calling `vm_exec` is only needed once for it. So r62654 was NOT actually checking if it may catch exception. But for r62678, obviously we should set catch_except_p=TRUE for all ISeqs which may catch exception. Otherwise catch table lookup would fail. With this bugfix, code generated by r62655 might be worse, but at least while loop can be marked as `catch: FALSE` as expected. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c: refine error messagesnobu2018-03-102-68/+75
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62716 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* signal.c: check NUL bytesnobu2018-03-102-13/+9
| | | | | | | * signal.c (trap_signm): check NUL bytes explicitly before raising "unsupported signal" ArgumentError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mjit.c: keep mutex unlocked on destroyk0kubun2018-03-101-2/+1
| | | | | | | | | | | `mjit_finish` may destroy mutex even while it's still locked by `worker` by race condition. That would result in the following error: [BUG] pthread_mutex_destroy: Device or resource busy (EBUSY) Actually I couldn't get a core dump for it and reproduce it multiple times. So I'm not sure this fixes the issue which I faced or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole.c: fix typo. [ci skip]suke2018-03-101-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62713 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c: fix url of ActiveState. Thanks to Kazuhiro ↵suke2018-03-101-1/+2
| | | | | | Nishiyama. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix warning: cast from pointer to integer of different sizekazu2018-03-101-5/+5
| | | | | | | | | | | ``` .../ruby/iseq.c: In function ‘rb_vm_insn_null_translator’: .../ruby/iseq.c:137:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (int)addr; ^ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix error: implicit conversion loses integer precisionkazu2018-03-103-4/+4
| | | | | | | | | | | http://ci.rvm.jp/results/trunk_clang_50@silicon-docker/627906 ``` iseq.h:41:36: error: implicit conversion loses integer precision: 'rb_num_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32] int cnt = iseq->body->variable.flip_count; ~~~ ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62708 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-10svn2018-03-091-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add direct marking on iseq operandstenderlove2018-03-097-72/+171
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Directly marking iseq operands allows us to eliminate the "mark array" stored on ISEQ objects, which will reduce the amount of memory ISEQ objects consume. This patch changes the iseq mark function to: * Directly marks ISEQ operands * Iterate over and mark child ISEQs It also introduces two flags on the ISEQ object. In order to mark instruction operands, we have to disassemble the instructions and find the instruction parameters and types. Instructions may also be translated to jump addresses. Instruction sequences may get marked by the GC *while* they're mid flight (being compiled). The `ISEQ_TRANSLATED` flag is used to indicate whether or not the instructions have been translated to jump addresses so that when we decode the instructions we know whether or not we need to go from jump location back to original instruction or not. Not all ISEQ objects have any markable objects embedded in their instructions. We can detect whether or not an ISEQ has markable objects in the instructions at compile time. If the instructions contain markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object. This means that during the mark phase, we can skip decompilation if the flag is *not* set. In other words, we can avoid decompilation of we know in advance there is nothing to mark. `once` instructions have an operand that contains the result of a one-time compilation of a regex. Before this patch, that operand was called an "inline cache", even though the struct was actually an "inline storage". This patch changes the operand to be an "inline storage" so that we can differentiate between caches that need marking (the inline storage) and caches that don't need marking (inline cache). [ruby-core:84909] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* configure.ac: --disable-mathn optionnobu2018-03-093-3/+14
| | | | | | | | | | * Makefile.in, win32/Makefile.sub: move CANONICALIZATION_FOR_MATHN from config.h which affects all extension libraries to XCFLAGS for the core only. * configure.ac: added --disable-mathn option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: calling ordernobu2018-03-091-7/+7
| | | | | | | * math.c (math_log, rb_math_log): inverted calling order, to remove unused argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed useless assertions [ci skip]nobu2018-03-093-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62703 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: removed redundant conditionsnobu2018-03-091-23/+10
| | | | | | Fixnums can be compared by object values themselves only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62702 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: removed redundant conditionsnobu2018-03-091-27/+9
| | | | | | | | Fixnums can be compared by object values themselves only. Addition/subtraction/mulplication of fixnum 0 do not affect the sign. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62701 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: removed already unused macrosnobu2018-03-091-14/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62700 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-09svn2018-03-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62699 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Raise ArgumentError if host component is nilnaruse2018-03-082-0/+14
| | | | | | | From: oss92 <mohamed.o.alnagdy@gmail.com> fix https://github.com/ruby/ruby/pull/1278 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo [ci skip]kazu2018-03-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62697 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-08svn2018-03-081-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62696 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix error if the input is mixed Unicode and percent-escapesnaruse2018-03-082-3/+10
| | | | | | | | Reported by kivikakk (Ashe Connor) with tests and doc fix Patch based on mame and fix by naruse [Bug #14586] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transform_mjit_header.rb: inline ivar operationsk0kubun2018-03-071-0/+3
| | | | | | | | | | | | | | | | | | * Optcarrot before,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux] after,--jit: ruby 2.6.0dev (2018-03-07 trunk 62689) +JIT [x86_64-linux] last_commit=transform_mjit_header.rb: inline ivar operations Calculating ------------------------------------- before,--jit after,--jit optcarrot 67.852 69.359 fps Comparison: optcarrot after,--jit: 69.4 fps before,--jit: 67.9 fps - 1.02x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: check typenobu2018-03-072-2/+16
| | | | | | | * complex.c (m_cos, m_sin): determine the type by the internal type, not by a method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62689 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: check typenobu2018-03-072-3/+19
| | | | | | | * complex.c (nucomp_s_canonicalize_internal): determine the type by the internal type, not by a method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c, rational.c: no backrefnobu2018-03-072-12/+2
| | | | | | Since r37702, parsing complex and rational do not use regexp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62687 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c, rational.c: adjust indentnobu2018-03-072-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* date_core.c: check conversionnobu2018-03-072-19/+36
| | | | | | | * ext/date/date_core.c (offset_to_sec, d_lite_plus): check conversion results, to get rid of infinite recursion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_date_arith.rb: needs `test_` prefixnobu2018-03-071-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: conversions with IDnobu2018-03-071-7/+11
| | | | | | | * object.c (rb_to_integer, rb_check_to_int): convert to Integer with method ID. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c, rational.c: simplified macro conditionsnobu2018-03-072-15/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62682 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-07svn2018-03-061-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62681 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_insnhelper.c: blockparamproxy in rescuenobu2018-03-062-1/+13
| | | | | | | | * vm_insnhelper.c (vm_call_opt_block_call): get block handler from the method local frame. fix segfault at calling the proxy in rescue. http://twitter.com/wannabe53/status/970955247626567680 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62680 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_signal.rb: fix arguments ordernobu2018-03-061-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* _mjit_compile_pc_and_sp.erb: skip moving pck0kubun2018-03-064-3/+15
| | | | | | | | | | | | | | | | on !body->catch_except_p. We need to move pc only when JIT execution is canceled if the frame does not catch an exception. _mjit_compile_insn.erb: lazily move pc for such optimized case _mjit_compile_insn_body.erb: ditto _mjit_compile_send.erb: ditto * Optcarrot benchmark (--jit) Before: 65.31 fps After: 67.82 fps git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transform_mjit_header.rb: inline VM instructionsk0kubun2018-03-061-2/+33
| | | | | | | | | * Optcarrot benchmark (--jit) Before: 62.42 fps After: 65.31 fps git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* transform_mjit_header.rb: drop obsoleted debug codek0kubun2018-03-061-8/+0
| | | | | | Now RubyCI is stable for this part. We no longer use this. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62676 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: tSPACE for old bisonnobu2018-03-061-1/+2
| | | | | | | | * parse.y (tSPACE): define a separate token for escaped space, to fix `redefining user token number of ' '` error at word list separator on bison 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use the reference as failure messagesnobu2018-03-061-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62674 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: deadlock in backtracenobu2018-03-062-1/+23
| | | | | | | | * thread.c (unblock_function_set): check interrupts just once during raising exceptions, as they are deferred since r16651. [ruby-core:85939] [Bug #14577] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: remove rangerandnobu2018-03-061-12/+2
| | | | | | | * lib/resolv.rb (Resolv::DNS.rangerand): rand and random_number accept a Range. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* resolv.rb: close socketnobu2018-03-062-33/+88
| | | | | | | | | | | | | | | | | | | * lib/resolv.rb (UnconnectedUDP#lazy_initialize): store new sockets before binding, so the sockets get closed when the requester is closing. * lib/resolv.rb (ConnectedUDP#lazy_initialize): ditto. * lib/resolv.rb (UnconnectedUDP#close): synchronize to get rid of race condition. * lib/resolv.rb (ConnectedUDP#close): ditto. [ruby-core:85901] [Bug #14571] From: quixoten (Devin Christensen) <quixoten@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62671 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Removed redundant private declaration.hsbt2018-03-061-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62670 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2018-03-06svn2018-03-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread.c: reset waitq of keeping mutexes in childnormal2018-03-053-0/+26
| | | | | | | | | | | | | | We must not maintain references to threads in the parent process in any mutexes held by the child process. * thread_sync.c (rb_mutex_cleanup_keeping_mutexes): new function * thread.c (rb_thread_atfork): cleanup keeping mutexes [ruby-core:85940] [Bug #14578] Fixes: r58604 (commit 3586c9e0876e784767a1c1adba9ebc2499fa0ec2) ("reduce rb_mutex_t size from 160 to 80 bytes on 64-bit") git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix a typo [ci skip]kazu2018-03-051-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: named whitespacesnobu2018-03-052-0/+28
| | | | | | | * parse.y: named escaped whitespaces to show unexpected character. bare whitespaces should not appear outside of word_list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* README.md: removed unnecessary schemesnobu2018-03-051-2/+2
| | | | | | | | | `mailto:` scheme on text looking like email-address is unnecessary in Markdown. [Fix GH-1827] Co-Authored-By: YoeriH <yoeri90@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tiny Fix for ASYNC BUG error message copyingnobu2018-03-051-1/+1
| | | | | | | | | | | | | | The previous logic would overwrite the error message, replacing the message with the `fd` number. This tiny update will print the message in full. (I'm trying to debug an issue with the timer thread on my machine and the lack of error messages makes it really hard). [Fix GH-1829] From: Bo <bo@bowild.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e