aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* cont.c (fiber_store): fix WIN32 fibersnormal2014-10-162-1/+6
| | | | | | [ruby-core:65745] [ruby-core:65758] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47975 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: do not use disposed stringnobu2014-10-163-1/+13
| | | | | | | * parse.y (parser_here_document): do not append already appended and disposed code fragment. [ruby-dev:48647] [Bug #10392] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/-ext-/bug_reporter/test_bug_reporter.rb: fix racenormal2014-10-162-1/+6
| | | | | | | | | Signal delivery is not immediate, so wait for signal delivery. * test/-ext-/bug_reporter/test_bug_reporter.rb (test_bug_reporter_add): fix race git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_rubyoptions.rb: fix racenormal2014-10-162-1/+5
| | | | | | | | | Signal delivery is not guaranteed to be immediate, a process may exit before receiving signal it sent itself. * test/ruby/test_rubyoptions.rb (test_segv_test): fix race git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix typedefnobu2014-10-161-1/+1
| | | | | | | * cont.c (rb_fiber_struct): remove useless typedef. [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix compile errornobu2014-10-162-1/+6
| | | | | | | * cont.c (rb_fiber_t): fix compile error caused by move to vm_core.h at r47964. [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47969 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_process.rb: avoid killing wrong parentnormal2014-10-162-1/+7
| | | | | | | We must capture intended target PID before forking, since Process.ppid may change if parent dies (e.g. due to timeout) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix when FIBER_USE_NATIVE is 0normal2014-10-152-1/+9
| | | | | | * cont.c (fiber_store): restore references to next_fib (fix typo) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: fix build when FIBER_USE_NATIVE is 0normal2014-10-152-5/+6
| | | | | | * cont.c (fiber_store): remove references to nextfib git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2014-10-151-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Optimize fiber_switch calleesnormal2014-10-154-103/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove some unnecessary VALUE/struct conversions and aggressively inline functions used during fiber_switch. Either of these changes alone does not yield significant performance increase, but in combination they improve performance by ~6%. Arguably, removal of separate VALUE/rb_fiber_t* variables also makes the code more readable in a few places. * vm_core.h: declare rb_fiber_t typedef (rb_thread_t): fiber and root_fiber become rb_fiber_t * (from VALUE) * vm.c (rb_thread_mark): use rb_fiber_mark_self * cont.c (rb_fiber_t): prev becomes rb_fiber_t * (from VALUE) (cont_mark, cont_free): simplify conditions (rb_fiber_mark_self): new function (fiber_mark): use rb_fiber_mark_self (cont_save_thread, cont_restore_thread): inline (cont_restore_thread): simplify (fiber_setcontext): simplify conditions (rb_cont_call): remove dereference (fiber_t_alloc): update for rb_fiber_t->prev type change (rb_fiber_start): ditto (fiber_current): extract from rb_fiber_current (return_fiber): move, simplify type checks (rb_fiber_current): use fiber_current (fiber_store): simplify type checks (fiber_switch): ditto, simplify call to fiber_setcontext, use fiber_current (rb_fiber_transfer): update for type changes (rb_fiber_terminate): move, use fiber_switch (rb_fiber_resume): update for type changes (rb_fiber_reset_root_local_storage): ditto (rb_fiber_yield): use rb_fiber_switch instead of rb_fiber_transfer (rb_fiber_m_transfer): ditto [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c (cont_save_thread): Sparse copying of thread datanormal2014-10-152-8/+39
| | | | | | | | | | | | | Instead of copying the complete rb_thread_t struct (almost a kB), selectively copy only those fields that will be needed later on. * cont.c (rb_context_t): comment on saved_thread (cont_save_thread): sparse copy (cont_init): copy extra fields (fiber_init): use current thread VM stack size [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Small code cleanupnormal2014-10-152-3/+7
| | | | | | | | | | | | Remove variable that is used only once, several lines after initialization. * cont.c (cont_capture): remove unnecessary variable [ruby-core:65518] [Feature #10341] Author: Knut Franke <Knut.Franke@gmx.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47962 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Code cleanup in fiber_switch/fiber_storenormal2014-10-152-42/+46
| | | | | | | | | | | | | | | | | | | | Defragment code blocks depending on FIBER_USE_NATIVE in order to make the control flow (which is already non-trivial due to nonlocal jumps) in each case more comprehensible. Remove some unreachable code from fiber_switch (we've already excluded the case (th->fiber == fibval) at the start of the function). Remove call to rb_fiber_current which happened a few lines after accessing GET_THREAD()->fiber directly (so if that's ever 0 we're already screwed). Author: Knut Franke <Knut.Franke@gmx.de> * cont.c (fiber_store, fiber_switch): simplify [ruby-core:65518] [Feature #10341] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-10-16svn2014-10-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cont.c: Remove unused prev_fiber/next_fiber fieldsnormal2014-10-152-27/+8
| | | | | | | | | | | | | | | | They were added in r19890 (8a0d53a), with the explanation that it's a double linked list of fibers in the same thread, but without any code using them. * cont.c (rb_fiber_t): remove prev_fiber/next_fiber (fiber_link_join, fiber_link_remove): remove functions (fiber_free, fiber_init, root_fiber_alloc): remove references to removed fields and functions [ruby-core:65518] [Feature #10341] Author: Knut Franke <Knut.Franke@gmx.de> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_backtrace.c: fix unknown ID namenobu2014-10-151-0/+9
| | | | | | | | * vm_backtrace.c (id2str): adapt rb_id2str which returns 0 on unknown ID to return Qnil, since oldbt_arg functions expect Qnil on unknown method names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_backtrace.c: unknown name methodnobu2014-10-151-4/+8
| | | | | | | * vm_backtrace.c (location_format): adjust unknown name method results to other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2014-10-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_nprocessors_affin): Test CPU_ALLOC availability.akr2014-10-152-2/+7
| | | | | | | | CentOS 5 don't have CPU_ALLOC(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Simplify multiline condition.akr2014-10-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Simplify a regexp.akr2014-10-151-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Unused variable removed.akr2014-10-151-1/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/etc/etc.c (etc_nprocessors_affinity): use sched_getaffinityakr2014-10-153-0/+83
| | | | | | | | | | | | | for getting precious number of available cpus. * ext/etc/etc.c (etc_nprocessors): use etc_nprocessors_affinity if possible. [Feature #10267] etc-nprocessors-kosaki2.patch git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_pattern_list) Renamed fromakr2014-10-154-9/+39
| | | | | | | | | | | | assert_regexp_list. Show multiline string in multi lines. * test/-ext-/bug_reporter/test_bug_reporter.rb: Use assert_pattern_list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enum.c: nil if no iterationnobu2014-10-152-0/+2
| | | | | | | * enum.c (enum_inject): return nil if no iteration, instead of Qundef. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: split regexpsnobu2014-10-151-1/+2
| | | | | | | * test/ruby/test_rubyoptions.rb (SEGVTest::ExpectedStderrList): split backtrace information regexps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* enum.c: use Qundefnobu2014-10-151-8/+7
| | | | | | * enum.c (enum_inject): use Qundef for no initial values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/envutil.rb (assert_regexp_list): New assertion method.akr2014-10-153-10/+40
| | | | | | | | * test/ruby/test_rubyoptions.rb: Use assert_regexp_list. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Extract assert_segv and split the big regexp.akr2014-10-151-35/+58
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c: min(n) drops elements bigger than the n-th maximum element.akr2014-10-142-1/+26
| | | | | | | | | | (struct nmin_data): New field to record the n-th maximumelement, limit (nmin_filter): Update limit field. (nmin_i): Drop too big eleents. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_optimization.rb (test_string_size): new testnormal2014-10-142-0/+9
| | | | | | String#size may be overridden, so test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_optimization.rb: redefinition tests for Stringnormal2014-10-142-0/+24
| | | | | | | * test/ruby/test_optimization.rb (test_string_eq_neq): new test (test_string_ltlt): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_optimization.rb (test_hash_aset_with): assert assignmentnormal2014-10-142-1/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (rb_obj_id): [DOC] Fix typo, clean up sentence, and wrap colszzak2014-10-142-5/+10
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-10-15svn2014-10-141-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * error.c: [DOC] Fix case of type in exception message by @tricknoteszzak2014-10-143-2/+9
| | | | | | | | | [Fixes GH-740] https://github.com/ruby/ruby/pull/740 * object.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rbinstall.rb: fix .gemspec permissionsnobu2014-10-142-0/+7
| | | | | | | * tool/rbinstall.rb (gem): Fix permissions of bundled gems specification files. [ruby-core:65700] [Bug #10383] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/win32ole/win32ole_record.c: use typed data.suke2014-10-142-6/+37
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: ids arraynobu2014-10-143-39/+33
| | | | | | | * symbol.c (global_symbols): make ids two-dimensional array of strings and symbols, for write-barrier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: immortal IDsnobu2014-10-144-318/+220
| | | | | | | * symbol.c (global_symbols): make IDs immortal always, instead of treating dynamic symbols as IDs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol.c: rename rb_str_dynamic_internnobu2014-10-146-24/+20
| | | | | | | | * iseq.c, marshal.c, string.c: use rb_str_intern instead of rb_str_dynamic_intern. * symbol.c (rb_str_intern): rename rb_str_dynamic_intern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test new optimizations for redefinesnormal2014-10-142-0/+30
| | | | | | | | | | * test/ruby/test_optimization.rb (test_string_freeze): new test (test_hash_aref_with): ditto (test_hash_aset_with): ditto Our new (in 2.2) optimizations must not trigger when redefined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2014-10-131-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/date/lib/date.rb: fix indent [ci skip]zzak2014-10-131-8/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47909 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/tk/tcltklib.c: (experimental) support Tcl/Tk8.6.2.nagai2014-10-132-4/+48
| | | | | | | * ext/tk/extconf.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47908 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (nmin_run): max(n) and max_by(n) returns an array inakr2014-10-134-5/+14
| | | | | | | | | descending order. [ruby-core:65452] Suggested by David Grayson. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-10-14svn2014-10-131-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47906 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix a typo for r47897.nagachika2014-10-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: update-gems for older BASERUBYnobu2014-10-132-2/+8
| | | | | | | | * common.mk (update-gems): chdir to the target directory and then add the tool directory to load paths, for older BASERUBY. [Bug #10372][ruby-core:65630] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e