summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-18test_rubyoptions.rb: skip testing JIT on mswink0kubun
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63996 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-18ruby.c: accept --disable-jit optionk0kubun
by promoting jit to feature flag. mjit.h: update comment about mjit_opts.on test_rubyoptions.rb: add test for switching JIT enablement "--jit" flag usage may be deprecated later, but not discussed yet. [Feature #14878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-18reduce tzsetnobu
* time.c (rb_localtime_r): call tzset() only after TZ environment variable is changed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-18zlib (rb_gzreader_getc): localize and return cbuf directlynormal
No point in having a long-lived cbuf in "struct gzfile" since GZFILE_CBUF_CAPA is smaller than RSTRING_EMBED_LEN_MAX (even on 32-bit). We can also have rb_econv_convert write directly to the return value instead of an intermediate buffer. This brings "struct gzfile" from 264 to 256 bytes on 64-bit systems to avoid taking an additional cache line. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17Include the alternative malloc header instead of malloc.htenderlove
This commit fixes a build error on systems that have `malloc_usable_size` but also enable jemalloc via `--with-jemalloc`. For example, Ubuntu Precise defines `malloc_usable_size` in malloc.h, so gc.c will include malloc.h. This definition conflicts with jemalloc's definition, so the following error occurs: ``` compiling gc.c compiling hash.c In file included from gc.c:50:0: /usr/include/malloc.h:152:15: error: conflicting types for 'malloc_usable_size' /usr/include/jemalloc/jemalloc.h:45:8: note: previous declaration of 'malloc_usable_size' was here cc1: warning: unrecognized command line option "-Wno-self-assign" [enabled by default] cc1: warning: unrecognized command line option "-Wno-constant-logical-operand" [enabled by default] cc1: warning: unrecognized command line option "-Wno-parentheses-equality" [enabled by default] cc1: warning: unrecognized command line option "-Wno-tautological-compare" [enabled by default] ``` Since jemalloc always defines `malloc_usable_size`, this patch just includes the jemalloc header instead of malloc.h if it's available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63992 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17revert r63988k0kubun
Due to trunk-mjit CI failures: http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130097 http://ci.rvm.jp/results/trunk-mjit@silicon-docker/1130196 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17insns.def: remove redundant ifndef in r63988k0kubun
By the way, the original patch of r63988 was provided by wanabe: https://github.com/wanabe/ruby/tree/local-stack but I forgot to add his credit in the previous commit message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17* 2018-07-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17mjit_compile.c: resurrect local variable stackk0kubun
This optimization was reverted on r63863, but this commit resurrects the optimization to skip some sp motions on JIT execution. tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto tool/ruby_vm/views/_mjit_compile_insn.erb: ditto insns.def: resurrect handles_frame as handles_stack, which was deleted on r63763. tool/ruby_vm/models/bare_instructions.rb: ditto vm_insnhelper.c: prevent moving sp outside insns.def to allow modifying it by JIT. * Optcarrot benchmark $ benchmark-driver benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count 12 -v before --jit: ruby 2.6.0dev (2018-07-17 trunk 63987) +JIT [x86_64-linux] after --jit: ruby 2.6.0dev (2018-07-17 local-stack 63987) +JIT [x86_64-linux] last_commit=mjit_compile.c: resurrect local variable stack Calculating ------------------------------------- before --jit after --jit Optcarrot Lan_Master.nes 70.518 72.144 fps Comparison: Optcarrot Lan_Master.nes after --jit: 72.1 fps before --jit: 70.5 fps - 1.02x slower git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17Promote Synchronizer to default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17Unified common workflow for default gems.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63986 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17test for wrong order: optionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17Fix message when `order` was an invalid valuenobu
The symbol that can be used is `:bottom`, not `:down`. Ref: https://github.com/ruby/ruby/blob/e39b2cff8ac2dc93b35bd43ffcce3ded8e3b4c25/error.c#L1061 [Fix GH-1916] From: yuuji.yaginuma <yuuji.yaginuma@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63984 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17ruby-runner.c: show the failed pathnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63983 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-17dir.c: fix glob with base when no DT_UNKNOWNnobu
* dir.c (do_stat, do_lstat): need the length of the base path for fstatat() when fd is valid. * dir.c (glob_helper): fix for platforms where DT_UNKNOWN is not available, e.g. Solaris. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16* 2018-07-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16[DOC] Update doc of NameError.new [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16No one knows how many leap seconds in year 2100naruse
Just check whether leep seconds are considered or not. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16tool/downloader.rb:duerst
* remove initial "./" from destdir to make downloading ./enc/unicode/data/11.0.0/ucd/auxiliary/GraphemeBreakProperty.txt work properly * tweak a comment git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63978 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16ruby.c: disable DidYouMean as gemnobu
* ruby.c (process_options): as DidYouMean requires Rubygems, disable the former when the latter is disabled too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16parse.y (heredoc_identifier): Update comment for term_lenyui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16* 2018-07-16svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-16parse.y: Add comment for `rb_strterm_heredoc_struct.sourceline`yui-knk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15node.h: remove unused macro nd_compile_optionktsj
Follow up of r61610 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15vm_core.h, vm_dump.c: fix castktsj
Revert r63968 and cast at caller side to prevent unintentional casting. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15process.c: adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15insns.def: fix typo in commentktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15vm_dump.c: fix warning about constnessktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-15vm_core.h: add missing castktsj
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-14* 2018-07-15svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-14Fix documentation in Object#remove_instance_variablewatson1978
It should be described that the string argument will be accept like Object#instance_variable_get. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-14* 2018-07-14svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-14webrick/httpresponse: set_redirect requires a valid URInormal
Prevents response splitting and HTML injection attacks in poorly-written applications which blindly pass along user input in redirects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-13process.c (assert_close_on_exec): quiet warning about unused resultnormal
Not much we can do if writing to STDERR_FILENO fails. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-13test/ruby/test_signal.rb (test_sigchld_ignore): increase timeoutnormal
I suspect CI test machine was overloaded at the time, or swapping at the time due to parallel build with mjit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12* 2018-07-13svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12timer_thread: do not close pipes around forknormal
There's actually no need to close the pipes used by the sleepy timer thread before forking, only to stop the timer thread itself. Instead, we only close the parent pipes in the child process, either via close-on-exec flag or when reinitializing the timer thread. This change will be necessary when we allow rb_wait_for_single_fd and rb_thread_fd_select to wait on the timer_thread_pipe.normal[0] directly and eliminate timer thread. I don't anticipate compatibility problems with this change alone. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12Improve branch missesnobu
Improve branch misses on frozen object predicate checks negatively affecting performance of most setters as most objects are not frozen. [Fix GH-1913] From: Lourens Naudé <lourens@bearmetal.eu> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12Fix compile error on debian8 and gentookazu
https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20180711T213004Z.log.html.gz#miniruby https://rubyci.org/logs/rubyci.s3.amazonaws.com/gentoo/ruby-trunk/log/20180711T213003Z.log.html.gz#miniruby ``` ./include/ruby/ruby.h:2213:49: error: missing binary operator before token "(" # if defined(__has_attribute) && __has_attribute(diagnose_if) ^ ``` git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12removed unusecd constantsnobu
* ruby-runner.c (ruby_libm_func): removed as the following test actually doesn't need the path of libm. * test/fiddle/test_pointer.rb (Fiddle::TestPointer#test_free=): removed never used constants and instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-12exe/ruby: link libm for fiddle testnobu
* common.mk (exe/ruby): $(LIBS) should come after the source file due to the ld spec. * ruby-runner.c (ruby_libm_func): force to link libm for fiddle test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11* 2018-07-12svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11benchmark/README.md: skip showing --timeout option [ci skip]k0kubun
because it's only available for limited platforms for now. I'll make it portable and show it later. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11Failed to unlink before close on mswinkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11test/ruby/test_io.rb (test_copy_stream_to_duplex_io): join threadnormal
Don't leave runaway threads as it could affect other tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11Make block spacing consistentnobu
[Fix GH-1910] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11test/ruby/test_io.rb: skip garbage and CPU tests if multi-threadednormal
Threads should not be active during these tests, but maybe they are... ref: https://bugs.ruby-lang.org/issues/14906 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11thread_pthread: avoid redundant error message on pipe2() failnormal
Seeing one error for pipe creation is enough. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11thread_pthread.c: use mask for timer implementationnormal
timer-thread will continue to be supported, but future "timer" implementation may not be a thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-11test/test_{tempfile,tmpdir}: get rid of leftover filesnormal
I ran out of inodes in $TMPDIR git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e