summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-20ruby-lex.rb: merge regexpsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20refactor torexp to use routine in array.cshyouhei
Found a part where copy&paste can be eliminated. Reduces vm_exec_core from 26,228 bytes to 26,176 bytes in size on my machine. I believe it does not affect any runtime performance. ---- * array.c (rb_ary_tmp_new_from_values): extend existing rb_ary_new_from_values function so that it can take additional value for klass. * array.c (rb_ary_new_from_values): use the new function. * insns.def (toregexp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20Removed math mode from irb.hsbt
mathn is deprecated from Ruby 2.2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20common.mk: separate notenobu
* common.mk (build-ext): separate note from building extensions, not to be intermingled. [ruby-core:80759] [Feature #13302] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20Removed deprecated extensions of mathn.hsbt
* ext/mathn/{complex,rational}: Removed from ruby core. [fix GH-1542][Feature #13334][ruby-core:80247] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20extmk.rb: fail for mandatory librariesnobu
* ext/extmk.rb: fail if a mandatory extension library failed to configure. [ruby-core:80759] [Feature #13302] * template/exts.mk.tmpl: move `exit` at the end. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20improve man pagesstomar
* man/ruby.1, man/erb.1, man/goruby.1, man/irb.1: fix document title formatting and volume name, improve "REPORTING BUGS" section: fix mdoc formatting error (wrong macro for bullet list items), small rewordings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ri.1: rewrite ri man pagestomar
* man/ri.1: update the (very outdated) ri man page: * update document date * fix document title formatting and volume name * update descriptions and options to current ri --help text * fix some mdoc formatting errors (missing escaping of `\', wrong macro for bullet list items) * various rewordings and other improvements git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ri.1: fix errors in ri man pagestomar
* man/ri.1: fix some errors in ri man page (add missing options, remove options that do not exist, fix formatter list). Reported by Josh Cheek. [ruby-core:68065] [Bug #10838] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20add a debug function.ko1
* vm_dump.c (rb_vmdebug_stack_dump_all_threads): dump stack dump for all living threads. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20Move test_extlibs.rb because it's not the test of ruby itselfusa
* test/test_extlibs.rb: moved from test/ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19* 2017-04-20svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19fix infinite recursionnobu
* vm_insnhelper.c (vm_once_dispatch): no guarantee that tail call is always optimized away. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19extmk.rb: improve message printed when configuring extensions failsrhe
Point to the mkmf.log if configuring an extension fails so that people can find and fix the culprit easily. [ruby-core:80131] [Feature #13302] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19Rervert r58304. Because Rubygems have specialized finder for default gems.hsbt
We need to list library entries for default gems. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19refactor extract binop dispatchershyouhei
Those opt_something instructions are worth refactoring. They tend to have similar ways of executions. By extracting the common part, generated vm_exec_core function shrinks from 26,816 bytes to 26,256 bytes (according to nm(1)). This changeset introduces negligible performance impact. 3 repeated runs of optcarrot benchmark on my machine resulted in: before this: 28.813363684823557, 27.523907198440366, 27.292766121965400 after this: 28.174038497265080, 28.999513875020405, 29.621399800428065 in fps (greater==faster). ---- * vm_insnhelper.c (vm_opt_binop_dispatch): new function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19* 2017-04-19svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-19socket: avoid fcntl for read/write_nonblock on Linuxnormal
On platforms where MSG_DONTWAIT works reliably on all sockets (so far, I know of Linux), we can avoid fcntl syscalls and implement IO#write_nonblock and IO#read_nonblock in terms of the socket-specific send and recv family of syscalls. This avoids side effects on the socket, and also encourages generic code to be written in cases where IO wrappers like OpenSSL::SSL::SSLSocket are used. Perhaps in the future, side-effect-free non-blocking I/O can be standard on all files and OSes: https://cr.yp.to/unix/nonblock.html * ext/socket/lib/socket.rb (read_nonblock, write_nonblock): Linux-specific wrapper without side effects [ruby-core:80780] [Feature #13362] * test/socket/test_basicsocket.rb (test_read_write_nonblock): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18fixup! vm_insnhelper.c: adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18compile.c: wrong optimizationnobu
* compile.c (compile_branch_condition): expression which has side effects should not be eliminated. [ruby-core:80740] [Bug #13444] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18vm_insnhelper.c: adjust indent [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18typo fix (sorry!) [ci skip]shyouhei
Surprisingly this was not a syntax error on my machine. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18test_optimization.rb: heredoc code stylenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18fix compile error.ko1
* insns.def (trace): use cast `flag` to pass compilation with clang on MacOSX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18Fix heading of README.hsbt
[Fix GH-1586] Patch by @jbampton git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18tabify (sorry!) [ci skip]shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18split insns.def into functionsshyouhei
Contemporary C compilers are good at function inlining. They fold multiple functions into one. However they are not yet smart enough to unfold a function into several ones. So generally speaking, it is wiser for a C programmer to manually split C functions whenever possible. That should make rooms for compilers to optimize at will. Before this changeset insns.def was converted into single HUGE function called vm_exec_core(). By moving each instruction's core into individual functions, generated C source code is reduced from 3,428 lines to 2,847 lines. Looking at the generated assembly however, it seems my compiler (gcc 6.2) is extraordinary smart so that it inlines almost all functions I introduced in this changeset back into that vm_exec_core. On my machine compiled machine binary of the function does not shrink very much in size (28,432 bytes to 26,816 bytes, according to nm(1)). I believe this change is zero-cost. Several benchmarks I exercised showed no significant difference beyond error mergin. For instance 3 repeated runs of optcarrot benchmark on my machine resulted in: before this: 28.330329285707490, 27.513378371065920, 29.40420215754537 after this: 27.107195867280414, 25.549324021385907, 30.31581919050884 in fps (greater==faster). ---- * internal.h (rb_obj_not_equal): used from vm_insnhelper.c * insns.def: move vast majority of lines into vm_insnhelper.c * vm_insnhelper.c: moved here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18eval.c: fix exit inside TAGnobu
* eval.c (setup_exception): do not exit by goto inside PUSH_TAG/POP_TAG. it causes an infinite loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18configure.in: honor GIT envnobu
* configure.in (--with-git): honor environment variable GIT if set. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18vcs.rb: env for commandnobu
* tool/vcs.rb (VCS::SVN::COMMAND, VCS::GIT::COMMAND): customize command paths by environment variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-18enc/depend: remove Unicode versionsnobu
* enc/depend (enc/unicode.o): remove hardcoded Unicode versions. this object file must be compiled by toplevel make. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17* 2017-04-18svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17should not return.ko1
* test/ruby/test_settracefunc.rb (test_throwing_return_with_finish_frame): should not use `return`, but should use `next`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17string.c: improve insertion performacenobu
* string.c (rb_str_splice_0): improve performace of single byte optimizable cases, insertion 7bit string to 7bit string. [ruby-dev:49984] [Bug #13228] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17thread_win32.c: fix indexnobu
* thread_win32.c (w32_wait_events): fix wait object index in the case of interrupt_event is not usable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17eval.c: copy before cause setupnobu
* eval.c (setup_exception): copy frozen exception before setting up a cause not only a backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17eval.c: copy special exceptions before raisenobu
* eval.c (setup_exception): consider if the exception is frozen, but not one of special exception objects. * gc.c (rb_memerror): copy minimum objects. * thread.c (rb_threadptr_execute_interrupts): prepare special exception queued by another thread to be raised. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17vm_insnhelper.c: rb_threadptr_stack_overflownobu
* vm_insnhelper.c (rb_threadptr_stack_overflow): move from thread.c and integrate with vm_stackoverflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17parse.y: fix for empty `__VA_ARGS__`nobu
* parse.y (WARN_CALL, WARNING_CALL): need `##` between a comman and `__VA_ARGS__` in the case it is empty, not to end arguments with a comma. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17vm_backtrace.c: backtrace functions per threadsnobu
* vm_backtrace.c (rb_threadptr_backtrace_object): rename and extern. * vm_backtrace.c (rb_threadptr_backtrace_str_ary): rename as threadptr since the parameter is rb_thread_t*. * vm_backtrace.c (rb_threadptr_backtrace_location_ary): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17eval.c: share rb_longjmpnobu
* eval.c (rb_longjmp, rb_raise_jump): parameterize thread, and share rb_longjmp. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17gc.c: rb_threadptr_stack_checknobu
* gc.c (rb_threadptr_stack_check): check probability of stack overflow for the given thread, not the current thread. * vm_eval.c (stack_check): check the given thread, not the current thread. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-17gc.c: PREVENT_STACK_OVERFLOWnobu
* gc.c (PREVENT_STACK_OVERFLOW): define TRUE to try preventing stack overflow before actually happens. * gc.c (stack_check): parameterize thread pointer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58374 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16* 2017-04-17svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16test_integer.rb: simplify teststomar
* test/ruby/test_integer.rb: simplify test for Integer.sqrt. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16rbinstall.rb: ignore skipped extsnobu
* tool/rbinstall.rb (default-gems): skip gemspec if corresponding Makefile does not exist. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16thread_win32.c: no GVL for interrupt_eventnobu
* thread_win32.c (w32_wait_events): do not acquire GVL, to fix deadlock at read/close race condition. instead, just ignore interrupt_event if it is closed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16test/ruby/test_io.rb: use Thread.stop? to waitnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58369 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-16* test/ruby/test_io.rb (test_race_closed_stream): separate because it stopsusa
entire test process on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e