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

50197 Коммитов

Автор SHA1 Сообщение Дата
svn b6f290f21c * 2018-02-22
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 17:06:24 +00:00
mame 3095f4ecc6 * NEWS: add NEWS entry about Binding#source_location [Feature #14230]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 17:06:23 +00:00
nobu a238423873 test_process.rb: unlimited getgroups on darwin
* test/ruby/test_process.rb (TestProcess#test_maxgroups): Darwin
  extension of getgroups(2) which is not limited to MAXGROUPS is
  used.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 09:04:48 +00:00
ko1 19a1899470 use `--version`.
* benchmark/driver.rb: use `--version` instead of `-v` to get version
  information.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 08:51:49 +00:00
ko1 633b463854 add NEWS entries about [Feature #14318] and [Feature #14330].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 08:14:51 +00:00
hsbt 322d0d93ad Update url with 404 status on LEGAL file.
* Update redirected and upstream url.
  * Added the Wayback Machine url for missing link.

  [Bug #12762][ruby-dev:49802]

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 07:12:17 +00:00
hsbt d5eef5380d Update maintainers of unmaintained libraries.
[Misc #14211]

From: SHIBATA Hiroshi <hsbt@ruby-lang.org>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 06:31:39 +00:00
nobu 3a56b957dc test_time_tz.rb: past Japanese DST tzdata fix
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): fix
  the expected data at the end of DST.  [Bug #14438]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 05:37:23 +00:00
nobu d6ac121304 test_time_tz.rb: past Japanese DST tzdata fix
* test/ruby/test_time_tz.rb (TestTimeTZ#test_asia_tokyo): follow
  the tzdata 2018 fix of Japanese DST transitions (1948-1951).
  [ruby-core:85373] [Bug #14438]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 02:21:10 +00:00
nobu ef04d43fbb vm_insnhelper.c: no insns_info in jit
* vm_insnhelper.c: instructions info are not used in jit source
  code.  resolved a warning by transform_mjit_header.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 00:55:22 +00:00
nobu 4eaf69858b Makefile.in (mjit_config.h): fix duplicated output
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 00:36:29 +00:00
svn 83b428d964 * 2018-02-21
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 00:17:54 +00:00
nobu 9e42f78198 Makefile.in: empty comment
* Makefile.in (mjit_config.h): add an empty comment if no content,
  to tell the empty content explicitly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-21 00:17:54 +00:00
nobu 55515ef463 error.c: bypass Exception.new
* error.c (rb_exc_new, rb_exc_new_str): instantiate exception
  object directly without Exception.new method call.

Redefinition of class method `new` is an outdated style, and
internal exceptions should not be affected by it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 10:08:27 +00:00
nobu 64072aa8e1 mjit.c: separate call from macro
* mjit.c (convert_unit_to_func): separate a function call from a
  macro, which evaluates the argument multiple times.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 09:39:41 +00:00
nobu b2033b8b84 Signature of rb_uint2inum and rb_int2inum
* include/ruby/ruby.h (rb_int2inum, rb_uint2inum): adjust
  declarations.  [ruby-core:83424] [Bug #14036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 09:38:55 +00:00
nobu 1cd9c3ce62 random.c: Random.bytes
* random.c (random_s_bytes): new method Random.bytes, which is
  equivalent to Random::DEFAULT.bytes.  [Feature #4938]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 09:26:38 +00:00
nobu 74bf1767e3 Makefile.in: fix for Solaris
* Makefile.in (mjit_config.h): expand for each words.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 09:16:34 +00:00
normal e691d4d71e tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros
AC_CHECK_TYPE (no "S") does not define HAVE_* macros for types,
so use AC_CHECK_TYPES (with "S") instead.  Without this,
HAVE_CLOCKID_T goes undefined and I can't USE_MONOTONIC_COND in
thread_pthread.c :<

Fixes: r62446 (git 673ae0e3c9)
	("configure.ac: check clockid_t with necessary headers")

* tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros
  [ruby-core:85659] [Bug #14494]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 08:44:38 +00:00
nobu d77e8a7da5 Signature of rb_uint2big and rb_int2big
* include/ruby/ruby.h (rb_uint2big, rb_int2big): declare with
  uintptr_t and intptr_t instead of VALUE and SIGNED_VALUE
  respectively.  [ruby-core:83424] [Bug #14036]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 08:01:44 +00:00
nobu 87234557eb mjit.c: fix compile error
* mjit.c (check_tmpdir): W_OK and S_ISDIR may not defined on
  Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 07:51:22 +00:00
nobu 18af42d5a4 mjit.c: prefer $TMPDIR and $TMP
* mjit.c (system_tmpdir): prefer `$TMPDIR` and `$TMP` over system
  defulat temporary directory, if exists, writable, and safe.
  [ruby-core:85651] [Bug #14496]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 05:32:07 +00:00
nobu 04178d396b mjit.c: dldflags on mingw
* mjit.c (CC_DLDFLAGS_ARGS): default libraries are necessary on
  Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 05:32:06 +00:00
nobu eb81638530 mjit.c: fix memory leak
* mjit.c (system_tmpdir): rb_w32_wstr_to_mbstr returns the pointer
  to `malloc`ed region.  allocate with `xmalloc` instead.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 04:05:42 +00:00
nobu 49f52937bd vm.c: disable dtrace in jit source
* vm.c: include dummy dtrace probes header in jit header.

* vm_insnhelper.c: probes headers are included by vm.c.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 03:15:33 +00:00
nobu fe5d65f157 common.mk: moved macros to mjit_config.h
* Makefile.in, common.mk, win32/Makefile.sub: moved MJIT macros to
  mjit_config.h from XCFLAGS.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 02:37:28 +00:00
svn 2124cb65b3 * 2018-02-20
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 01:23:24 +00:00
nobu 3dd9b87861 Makefile.in: function to quote for mjit_config.h
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-20 01:23:23 +00:00
normal 92dd6d8445 thread_pthread.c: spelling ("cancellation")
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 09:28:56 +00:00
normal 4651ef77d2 thread_pthread.c: fix thread cache for non-monotonic clock
I noticed this because of https://bugs.ruby-lang.org/issues/14494

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 09:28:51 +00:00
nobu 628be3b7dc mjit.c: fix a typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 06:28:03 +00:00
nobu 14693ba549 Escape MINIRUBY in --make-flags to extmk.rb
If MINIRUBY had arguments, which is the case of cross compiling
they wouldn't be parsed correctly and compiling would fail as a RUBY
without arguments would then be present in the Makefile's in ext/*
[ruby-core:85620] [Bug #14486] [Fix GH-1819]

Author:    Carl Hörberg <carl.hoerberg@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 01:45:17 +00:00
normal 3cadd10ac5 thread_pthread.c (native_thread_create): remove needless attrp
Followup-to: r61719 (commit e8f40bd8f8)
  ("thread_pthread: remove HAVE_PTHREAD_ATTR_INIT ifdefs")
  [ruby-core:84758] [Misc #14342]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 00:30:43 +00:00
normal cfeb344bf2 thread_pthread.c (rb_thread_create_mjit_thread): destroy attr
This is required on some platforms to avoid leaks.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-19 00:23:00 +00:00
normal bff57efca1 thread_pthread.c (thread cache): destroy cond after unlock
No need to hold a lock while destroying a condition variable.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 23:58:35 +00:00
normal 7a8460ed5a thread_pthread.c (rb_thread_create_mjit): set detach before create
This should be slightly cheaper on NPTL as it does not rely on
atomics to set pd->joinid.   We already use pthread_attr_setdetachstate,
so it won't introduce new problems by using a function we did not
use before.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 23:58:30 +00:00
svn 1ad2db3894 * 2018-02-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 21:03:14 +00:00
normal eac50243c9 thread.c: remove redundant USE_SIGALTSTACK #define
thread.c already includes vm_core.h where USE_SIGALTSTACK is
defined, #include it explicitly (eval_intern.h already includes
it)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 21:03:13 +00:00
nobu 247ec65a6c mjit.c: pch file argument
* mjit.c (compile_c_to_so): pass pch file only when using
  "-include-pch" option.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 09:33:21 +00:00
nobu ae62ab3302 adjust indent
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 09:23:47 +00:00
kazu 189b4a4e37 README.ja.md: Mac OS X -> macOS [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 08:11:50 +00:00
normal 4a57b88b19 thread_pthread.c: shorten and fix thread cache implementation
Update to use ccan/list for constant-time delete on expiry and
avoid malloc.  We must also initialize th->thread_id upon thread
reuse so Thread#name= works immediately upon thread creation.

We must also reinitialize the cache mutex and list_head on
fork like we do with GVL and timer thread mutexes.
While we're at it, use monotonic clock for timeout to avoid
system time changes.

"make exam TESTS='-x test_time_tz'" passes with USE_THREAD_CACHE
enabled (but remains off, here).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 07:54:10 +00:00
nobu f3cc10b63d mjit.c: place DLDFLAGS at last
* mjit.c (compile_c_to_so): place DLDFLAGS at last, as compilers
  other than cl.exee don't care the order of flag arguments,
  usually.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 06:21:28 +00:00
nobu 32213cc8d6 aclocal.m4: remove ruby_check_va_copy.m4
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 05:12:26 +00:00
nobu 0f0c32f24e mjit.c: no va_copy
* mjit.c (form_args): do not use va_copy, which cannot detect
  appropriate way to simulate when cross compiling.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 05:10:52 +00:00
normal ecd2c08a4c thread.c (thread_join_m): handle negative timeouts correctly
Users may subtract and round into negative values when using
Thread#join, so clamp the timeout to zero to avoid infinite/long
timeouts.

Note: other methods such as Kernel#sleep and IO.select will
raise on negative values, but Thread#join is an outlier *shrug*

This restores Ruby 2.5 (and earlier) behavior.

Fixes: r62182 (commit c915390b95)
       ("thread.c: avoid FP for Thread#join")

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 03:00:33 +00:00
normal fbad2c5592 thread.c (double2timespec): adjust to use NULL for infinity
Using:
  strace ruby -e 'Thread.new { sleep }.join(Float::INFINITY)'

Will show a difference in futex() syscall args (not that I'd
ever advocate Float::INFINITY as a Thread#join arg :P)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 03:00:28 +00:00
usa cd0673e654 Fixed the order of arguments for cl.exe
* mjit.c (compile_c_to_so): `CC_DLDFLAGS_ARGS` must be after `-link` for cl.exe.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 02:51:31 +00:00
normal 8f47542d58 thread_pthread.c (native_cond_timeout): simplify
Rely on getclockofday for CLOCK_MONOTONIC, avoid needless
variables, and rely on overflow protection from timespec_add
instead of coding our own.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 02:12:23 +00:00
normal f65ee1e8f1 thread.c: stop updating timespec when timeout is unspecified
No need to waste cycles updating timespecs if there's no expiry.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-02-18 02:12:18 +00:00