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
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
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
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
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
* 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
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
* 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
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
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
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
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
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
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
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
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