Граф коммитов

35384 Коммитов

Автор SHA1 Сообщение Дата
nobu f88481740a dir.c: set PLAIN for non-magical
* dir.c (glob_make_pattern): set PLAIN for non-magical path to
  skip parts which not need to glob.
  [ruby-core:61552] [Bug #9648]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17 01:40:34 +00:00
nobu 47f4eee420 dir.c: fix conditions for ALPHA
* dir.c (has_magic): return ALPHA at alphabetical name regardless
  FNM_CASEFOLD flag.
* dir.c (glob_helper): fix conditions for ALPHA.
  [ruby-core:61552] [Bug #9648]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45967 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17 01:05:06 +00:00
nobu 8cb6f21e1a dir.c: reduce matching
* dir.c (glob_helper): reduce matching at non-mgaical path on
  Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45966 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 16:49:38 +00:00
nobu 17d31216ea dir.c: match plain names as-is
* dir.c (glob_pattern_type): separate names with alphabet but no
  magical from plain.
* dir.c (glob_helper): match plain names as-is to treat super-root
  same as the root.  [ruby-core:61552] [Bug #9648]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 16:49:25 +00:00
svn bf52039259 * 2014-05-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 15:36:00 +00:00
usa 25b2a21b31 * tool/release.sh: need -f option because this overwrite the previous links if they exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45963 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 15:35:50 +00:00
kazu 8119cbae1f fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 09:18:51 +00:00
ko1 a86d454538 * gc.c (gc_marks, gc_marks_body): increase the counter of young objects
at the major GC because AGE2Promotion changes all old objects into
  young objects at major GC.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 08:41:06 +00:00
ko1 be5ed87c2f * gc.c (gc_before_sweep): heap_pages_swept_slots should contains
heap_pages_increment.
  For example, GC by exceeding malloc_limit can remain
  heap_pages_increment.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 08:38:04 +00:00
svn ee88a8deb2 * 2014-05-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45958 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 08:22:53 +00:00
nobu 29b5de1de2 dir.c: check boundary
* dir.c (glob_make_pattern): check boundary before accessing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45957 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-16 08:22:41 +00:00
shirosaki a7ebfe4b71 configure.in: enable SSE2 on mingw
* configure.in: enable SSE2 on mingw. target='i386-pc-mingw32'.
  [ruby-core:62095] [Bug #8358]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 12:31:36 +00:00
shirosaki eceff15e68 parallel.rb: fix test-all parallel failure
* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
  is skipped after raise.
  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
  But it causes Mashal.load failure due to undefined class/module
  DL::DLError when doing test-all parallel and test-all doesn't
  complete. We create new MiniTest::Skip object to avoid Mashal.load
  failure.
  [ruby-core:62133] [Bug #9767]

* test/testunit/test_parallel.rb (TestParallel): add a test.

* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 12:31:26 +00:00
nobu 27082c9dfa * gc.c (heap_extend_pages): fix indent.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 10:53:40 +00:00
kazu 31876e7c1c fix typos [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 10:34:57 +00:00
ko1 bceb547077 * gc.c (garbage_collect_body): move gc_heap_prepare_minimum_pages()
from gc_sweep().



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 09:58:21 +00:00
ko1 8d81c976aa * gc.c (heap_extend_pages): calculate next growing heap size.
* gc.c (heap_set_increment): accept addition pages instead of
  minimum pages.
* gc.c (gc_after_sweep): use heap_etend_pages().
* gc.c (gc_heap_prepare_minimum_pages): add only 1 page.
* gc.c (heap_ready_to_gc): add only 1 page.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 09:54:49 +00:00
ko1 28a180ed2f * gc.c: introduce macros to remove magic number.
GC_HEAP_FREE_SLOTS_MIN_RATIO = 0.3: guarantee minimum empty slots
                                      ratio after sweep.
  GC_HEAP_FREE_SLOTS_MAX_RATIO = 0.8: allow to free pages 0.2 (= 1-0.8)
                                      of current existing slots.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 09:43:18 +00:00
nobu 3343feeebf Handle machine stack overflow on mingw
* thread_win32.c (rb_w32_stack_overflow_handler): use Structured
  Exception Handling by Addvectoredexceptionhandler() for machine
  stack overflow on mingw.
  This would be equivalent to the handling using __try and __exept
  on mswin introduced by r43748.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 08:32:55 +00:00
svn 48de9363d2 * 2014-05-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 06:39:52 +00:00
nobu 34f95c7ca6 openssl/depend: ossl.o
* ext/openssl/depend (ossl.o): now depends on thread_native.h
  under $(hdrdir) instead of $(top_srcdir).  [Feature #9612]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 06:39:43 +00:00
ko1 7093a2cb5b * ext/openssl/depend: remove dependency from internal headers.
[Feature #9612]
* ext/openssl/ossl.c (ossl_fips_mode_set): ditto.
* ext/coverage/depend: ditto.
* include/ruby/thread_native.h: added.
  This header file only provides wrapper functions to control
  native threads. These wrapper functions are used by MRI
  implementation.
* vm_core.h: use include/ruby/thread_native.h.
* thread.c: ditto.
* thread_pthread.h: ditto.
* thread_win32.h: ditto.
* thread_native.h: removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-14 10:55:38 +00:00
ko1 1b03f51f82 * gc.c: enable RGENGC_AGE2_PROMOTION.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45943 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-14 09:04:27 +00:00
ko1 b4d9f9ca1d * gc.c (rgengc_rememberset_mark): promote remembered object earlier.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-14 09:03:17 +00:00
hsbt 6e2a2dd306 * LEGAL: added license infomation of ccan files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-14 02:07:32 +00:00
svn 5e023d6847 * 2014-05-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 15:47:38 +00:00
nobu 9fd859b860 make-snapshot: -digests option
* tool/make-snapshot (package): add -digests option to select
  digest algorithms to be shown.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45938 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 15:47:36 +00:00
nobu bebbbc393a make-snapshot: -package option
* tool/make-snapshot (package): add -package option to select
  packages to be made.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 15:47:33 +00:00
nobu 26db9bb27c make-snapshot: unused variables
* tool/make-snapshot (package): remove variables no longer used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45936 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 15:47:31 +00:00
nobu f67864636d make-snapshot: SHA512
* tool/make-snapshot (package): add SHA512.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45935 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 10:09:43 +00:00
nobu 944ff17f8a make-snapshot: support xz
* tool/make-snapshot (package): support xz.  no longer runs with
  1.8 or earlier.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45934 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 10:09:41 +00:00
akr a03eeb000a set svn:ignore property.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45933 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-13 10:05:43 +00:00
svn 30a0ef1c22 * 2014-05-13
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 15:15:46 +00:00
nagachika 2b319c297c * ChangeLog: fix a typo for r45930.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45931 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 15:15:43 +00:00
nobu f0fc13aaea configure.in: check atan2
* configure.in (rb_cv_atan2_inf_c99): check whether runtime atan2
  handles Inf as C99.  ruby-core:62536] [Bug #9831]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 14:57:17 +00:00
akr b063dd016c * configure.in: Invoke AC_REPLACE_FUNCS for each function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45926 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 11:33:39 +00:00
ko1 8be5c76f06 * gc.c: count young object correctly and show it in GC.stat
on RGENGC_AGE2_PROMOTION.
* gc.c (RVALUE_PROMOTE_YOUNG): decrement young object count on
  YOUNG->OLD.
* gc.c (obj_free): decrement young object count when young object
  freed.
* gc.c (gc_marks): should not clear young object count.
* gc.c (gc_stat_internal): GC.stat :young_object information.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 10:57:11 +00:00
nobu 4f8c0b90bb signal.c: check the next page too
* signal.c (check_stack_overflow): check the next page too.  SP in
  ucontext is not decremented yet when `push` failed, so the fault
  page can be the next.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45924 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-12 01:35:09 +00:00
svn 642e3ae935 * 2014-05-12
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 16:31:57 +00:00
akr 543b402f38 * ext/socket/ifaddr.c (IS_IFADDRS): Unused macro removed.
* ext/strscan/strscan.c (BUFSIZE): Ditto.

* ext/zlib/zlib.c (OBJ_IS_FREED): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45922 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 16:31:51 +00:00
akr dd5d029db0 * compile.c (BUFSIZE): Unused macro removed.
* vm.c (BUFSIZE): Ditto.

* pack.c (INT64toNUM): Ditto.
  (UINT64toNUM): Ditto.
  (BYTEWIDTH): Ditto.

* time.c (lshift): Ditto.
  (UINT64toNUM): Ditto.
  (id_lshift): Unused variable removed.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45921 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 13:29:16 +00:00
akr 49771dd308 * pack.c (swaps): Unused macro removed.
(swapi): Ditto.
  (swapl): Ditto.
  (swapll): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 12:24:11 +00:00
nobu c1268be411 test_process.rb: duplicate assertions
* test/ruby/test_process.rb (test_status_{kill,quit}): remove
  duplicate assertions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 10:40:18 +00:00
nobu 61cd4e9dda test_process.rb: WIFEXITED and so on are system dependent
* test/ruby/test_process.rb (test_status_kill): WIFEXITED and so
  on are available only if signal is supported by the system.
  [ruby-dev:48203] [Bug #9820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45918 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 03:19:29 +00:00
nobu a3656d4222 signal.c: directly deliver non-handlable signals
* signal.c (rb_f_kill): directly deliver signals which cannot be
  handled, i.e., SIGKILL and SIGSTOP.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 01:02:47 +00:00
nobu c6e9e4110e configure.in: check typeof
* configure.in (rb_cv_typeof): check typeof extension for ccan
  headers.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45916 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 00:33:45 +00:00
nobu 7c68a3121c vm.c: suppress a warning
* vm.c (rb_vm_living_threads_foreach): suppress "uninitialized"
  warning where "typeof" is unavailable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-11 00:25:36 +00:00
svn 7992b0ff39 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45914 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-10 23:49:06 +00:00
normal f11db2a605 vm*: doubly-linked list from ccan to manage vm->living_threads
A doubly-linked list for tracking living threads guarantees
constant-time insert/delete performance with no corner cases of a
hash table.  I chose this ccan implementation of doubly-linked
lists over the BSD sys/queue.h implementation since:

1) insertion and removal are both branchless
2) locality is improved if a struct may be a member of multiple lists
   (0002 patch in Feature 9632 will introduce a secondary list
   for waiting FDs)

This also increases cache locality during iteration: improving
performance in a new IO#close benchmark with many sleeping threads
while still scanning the same number of threads.

	vm_thread_close 1.762

* vm_core.h (rb_vm_t): list_head and counter for living_threads
  (rb_thread_t): vmlt_node for living_threads linkage
  (rb_vm_living_threads_init): new function wrapper
  (rb_vm_living_threads_insert): ditto
  (rb_vm_living_threads_remove): ditto
* vm.c (rb_vm_living_threads_foreach): new function wrapper
* thread.c (terminate_i, thread_start_func_2, thread_create_core,
  thread_fd_close_i, thread_fd_close): update to use new APIs
* vm.c (vm_mark_each_thread_func, rb_vm_mark, ruby_vm_destruct,
  vm_memsize, vm_init2, Init_VM): ditto
* vm_trace.c (clear_trace_func_i, rb_clear_trace_func): ditto
* benchmark/bm_vm_thread_close.rb: added to show improvement
* ccan/build_assert/build_assert.h: added as a dependency of list.h
* ccan/check_type/check_type.h: ditto
* ccan/container_of/container_of.h: ditto
* ccan/licenses/BSD-MIT: ditto
* ccan/licenses/CC0: ditto
* ccan/str/str.h: ditto (stripped of unused macros)
* ccan/list/list.h: ditto
* common.mk: add CCAN_LIST_INCLUDES
  [ruby-core:61871][Feature 9632 (part 1)]

Apologies for the size of this commit, but I think a good
doubly-linked list will be useful for future features, too.
This may be used to add ordering to a container_of-based hash
table to preserve compatibility if required (e.g. feature 9614).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-10 23:48:51 +00:00
nobu 3771a370ad thread.c: always deliver signal immediately
* thread.c (ruby_kill): always deliver signal immediately, without
  check for main thread.  no longer called in other context.
  [ruby-dev:48203] [Bug #9820]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45912 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-10 16:10:45 +00:00