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

53312 Коммитов

Автор SHA1 Сообщение Дата
k0kubun bdf5eb3b91 mjit_worker.c: fix typo [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:22:46 +00:00
k0kubun 0515904414 test_jit.rb: fix typo [ci skip]
we don't have such VM register

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 08:22:30 +00:00
normal 644f2013d6 vm_trace.c (rb_postponed_job_flush): use rb_atomic_t for mask
ec->interrupt_mask will remain rb_atomic_t and is 32-bit on some
64-bit systems while "unsigned long" is 64-bits.  So avoid
mismatching lengths and stick to rb_atomic_t.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 04:34:52 +00:00
nobu 5c334727f1 common.mk: dependency of io.c for r65779
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 04:21:52 +00:00
normal eb95929206 io.c: include vm_core.h for VM_UNREACHABLE
Thanks to Greg L <greg.mpls@gmail.com> for the report

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 03:37:04 +00:00
svn 0cdd459614 * 2018-11-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 01:37:46 +00:00
normal b5bb5ed0db io.c (novl_wait_for_single_fd): VM_UNREACHABLE instead of assert
This respects VM_CHECK_MODE and is more consistent with
the rest of our code.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 01:37:46 +00:00
svn e4c9a70c96 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 01:37:45 +00:00
normal 9a8b75a77e vm_core.h (rb_thread_set_current*): convert to static inline
We already use "static inline" heavily and there should be no
penalty for modern compilers; this adds type-checking, too.

This will make future changes easier-to-review.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-18 01:37:41 +00:00
nobu 2b894084ef test/mkmf/base.rb: use CC_WRAPPER same as the toplevel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-17 01:42:30 +00:00
nobu 077a15c829 [DOC] rational and imaginary literals [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-17 01:21:18 +00:00
svn 9d6968f1d3 * 2018-11-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 23:27:38 +00:00
svn 0a10c46dfc * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 23:27:38 +00:00
hsbt 3ec3d7d943 Switch to 2-0-stable branch of bundler/bundler repository from our fork repository.
https://github.com/bundler/bundler/tree/2-0-stable

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 23:27:37 +00:00
nobu f632ecd0ff Makefile.in: test-almost also needs mjit_build_dir.so
[ruby-core:89830] [Bug #15311]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 12:11:23 +00:00
shyouhei ffd9a7ea27 pack.c: cast from double to float can be undefined
Generally speaking, a value of double is not always representable
when demoted to a float. ISO C defines what to do when such
conversion loses precision, but leaves it undefined when the
value is completely out of range. (cf: ISO/IEC 9899:1990 section
6.2.1.4).

Because ruby do not have half-precision floating-point types this
is not a frequent headache but for pack / unpack, there are
specifiers that has something to do with C float types.  We have
to explicitly care these situations.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 09:04:34 +00:00
nobu 3c7852f801 common.mk: hack to export symbols for MJIT in ruby.imp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 07:08:58 +00:00
k0kubun e2074a359e test/excludes/_wercker: remove obsoleted pipeline name
from excludes directory names. test-mjit-wait / test-mjit are combined
and distributed as mjit-test1 and mjit-test2 now.

So the subdirectory names are changed to option names, --jit and --jit-wait.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:52:12 +00:00
nobu fe7773b933 common.mk: fix the pattern to be hidden
* common.mk (ruby.imp): consider symbol prefix, remove InitVM, and
  fix internal symbols start with a dot.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:52:01 +00:00
nobu 34cc6fef83 Make some internal functions static
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:52:00 +00:00
nobu 429245aa9f Prefix rb_ec_set_vm_stack
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:51:57 +00:00
k0kubun f98e323ef3 appveyor.yml: skip reverting comment improvement [ci skip]
This part was not intended in r65760

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:47:37 +00:00
svn 4686869fd9 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:45:17 +00:00
k0kubun c2ed1edebb appveyor.yml: give up running test_push_over_ary_max
because separately running it without -j didn't work.

Revert "appveyor.yml: run memory-exchausting test separately"
This reverts commit r65703.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 06:45:16 +00:00
nobu 1d66574aa9 [DOC] mention class method `new` [ci skip]
* NEWS: mention `new` class methods, instead of `initialize`
  insetance methods whic are not called by users directly.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 04:32:48 +00:00
k0kubun cb153527c4 [doc] Fix grammar typo in Pty_init() docstring [ci skip]
[Fix GH-2014]

From: Olle Jonsson <olle.jonsson@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 04:25:07 +00:00
k0kubun b90bac322b Test for undef'ed method in class hierachy
This probably should have been `#bar` on the instance of class `Undef2` all along
[Fix GH-2015]

From: Alex Snaps <alex.snaps@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 04:21:57 +00:00
shyouhei a9723e96f5 numeric.c: avoid division by zero
Forgot to add in r65751.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 04:05:53 +00:00
shyouhei 73549c501f bignum.c: fix bug in big2dbl()
I was wrong at r65753.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 03:34:53 +00:00
shyouhei 1a84c57e23 bignum.c: avoid (size_t)--
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 03:09:00 +00:00
shyouhei ca14914039 bignum.c: BDIGIT might or might not integer-promote
BDIGIT can be unsigned int or unsigned short, depending on BDIGIT_DBL.
Given that, unsigned int and unsigned short are different in how
integer promotion works.  BOGLO assumes its argument is wider than
BDIGIT, which is not always true.  We have to force that explicitly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 02:59:30 +00:00
shyouhei 6732423b5e enc/unicode.c: 'a' is bigger than 'A'
In ASCII, 'a' is bigger than 'A'. Which means 'A' - 'a' is a negative
number (-32, to be precise). In C, the type of 'a' and 'A' are signed
int (cf: ISO/IEC 9899:1990 section 6.1.3.4). So 'A' - 'a' is also a
signed int. It is `(signed int)-32`.

The problem is, OnigCodePoint is unsigned int. Adding a negative
number to a variable of OnigCodepoint (`code` here) introduces an
unintentional cast of `(unsigned)(signed)-32`, which is
4,294,967,264. Adding this value to code then overflows, and the
result eventually becomes normal codepoint.

The series of operations are not a serious problem but because
`code >= 'a'` holds, we can `(code - 'a') + 'A'` to reroute this.

See also: https://github.com/k-takata/Onigmo/pull/107


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 02:34:00 +00:00
shyouhei 3a083985a4 avoid division by zero
* cvt(): use signbit() instead of 1/d < 0
* w_float(): ditto
* ruby_float_step_size(): unit==0 check shall be prior to divisions
* arith_seq_float_step_size(): ditto
* rb_big_divide(): same as r65642
* fix_divide(): ditto
* rb_big_fdiv_double(): ditto
* fix_fdiv_double(): ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 01:52:39 +00:00
nobu a3b92a5d92 rbinstall.rb: do not install rdoc flag files [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 00:37:48 +00:00
nobu 9b38ed530f bignum.c: suppress unused variable warning
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 00:28:43 +00:00
nobu 027cf467a4 pack.c: refine warning
* pack.c (unknown_directive): refine warning message at unknown
  directive in unpack too, and quote unprintable characters.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 00:25:54 +00:00
nobu 6a6d03791b pack.c: adjust indent [ci skip]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-16 00:25:53 +00:00
svn ecb959bd8b * 2018-11-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 22:28:07 +00:00
svn 9c8119e78b * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 22:28:06 +00:00
normal 51aaf74bba include/ruby/ruby.h (RB_ALLOCV*): remove unnecessary GC guard
text	   data	    bss	    dec	    hex	filename
 3535061	  21232	  72944	3629237	 3760b5	ruby.before
 3534141	  21232	  72944	3628317	 375d1d	ruby.after

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 22:28:03 +00:00
shyouhei 06e2873ed1 eval_error.c: log10(0) is ERANGE
By definition, the logarithm of 0 is negative infinity.  This is a
pole error (cf: cf: ISO/IEC 9899:1999 section 7.12.1 paragraph 3) and
of course, cannot fit into an `int` value.  We have to resort to
INT_MIN.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 09:03:03 +00:00
shyouhei b7f5c573ef .travis.yml: give up mac universal binary [ci skip]
OK, nobody is actively willing to maintain this configuration.  Just
stop annoying people by build failures.  See:
https://travis-ci.org/ruby/ruby/jobs/455377387


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 08:33:38 +00:00
shyouhei abf728103f .travis.yml: -j3 [ci skip]
Now that ccache is enabled.  Compilations are made IO heavy, not CPU
bound.  This means parallel jobs beyond CPU count could gain more
speed.  From my experiment, I can conclude the good old "number of
cores plus one" tactics works the best.

The experiment: https://travis-ci.org/shyouhei/ruby/builds/454891855



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65741 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 07:37:05 +00:00
svn 906c8788b9 * expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 07:34:06 +00:00
shyouhei 86d1fc8863 suppress integer overflow warnings
* util.c: annotate as NO_SANITIZE
* bignum.c: avoid (size_t)--
* marshal.c: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65739 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 07:34:01 +00:00
nobu a42784000e . command in some sh cannot take arguments
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 06:22:17 +00:00
shyouhei f98004c0f2 hash.c: cast from double to unsigned is undefined
When a negative double is casted into an unsigned type, that operation
is undefined (cf: ISO/IEC 9899:1990 section 6.2.9.3).  Recent versions
of C kindly footnotes that "The remaindering operation performed when
a value of integer type is converted to unsigned type need not be
performed when a value of real floating type is converted to unsigned
type" (cf: ISO/IEC 9899:1999 section 6.3.1.4 footnote 50).

So it is a wrong idea to just cast a double to st_data_t.

The intention of the code is commented as "mix the actual float value
in".  It seems we should do a reinterpret_cast and rule out
static_cast.

Confirmed this changeset does not affect `make benchmark`.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65737 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 06:17:53 +00:00
svn ef5eacc0e0 * properties.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65736 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 05:22:45 +00:00
nobu 3dac8eda41 tool/mjit_archflag.sh: separated, too many escapes
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65735 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 05:22:44 +00:00
shyouhei 2212c1dc16 bignum.c: ee should be signed
In C, signed + unsigned of the same size results in unsigned (cf:
ISO/IEC 9899:1990 section 6.2.1.5). However `num` is signed here.
Which means the addition must be done in signed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65734 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-15 05:10:40 +00:00