Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3002
Merged-By: ioquatix <samuel@codeotaku.com>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3025
|
|
Since https://github.com/ruby/ruby/pull/2888 this macro is no longer
used in any place.
|
|
This reverts commit 443389effc37308ce1a3c3a840082a344fc6af56.
This reverts commit d94960f22ec2de3a3855305cb51343806d2b46c7.
Inclusion of header files must be explicit. Every file shall directly
include what is necessary.
https://github.com/include-what-you-use/include-what-you-use says:
> When every file includes what it uses, then it is possible to edit any
> file and remove unused headers, without fear of accidentally breaking
> the upwards dependencies of that file. It also becomes easy to
> automatically track and update dependencies in the source code.
Though we don't use iwyu itself, the principle quoted above is a good
thing that we can agree.
Now that include guards were added to every and all of the headers
inside of our project this changeset does not increase compile time, at
least on my machine.
Notes:
Merged: https://github.com/ruby/ruby/pull/3023
|
|
According to MSVC manual (*1), cl.exe can skip including a header file
when that:
- contains #pragma once, or
- starts with #ifndef, or
- starts with #if ! defined.
GCC has a similar trick (*2), but it acts more stricter (e. g. there
must be _no tokens_ outside of #ifndef...#endif).
Sun C lacked #pragma once for a looong time. Oracle Developer Studio
12.5 finally implemented it, but we cannot assume such recent version.
This changeset modifies header files so that each of them include
strictly one #ifndef...#endif. I believe this is the most portable way
to trigger compiler optimizations. [Bug #16770]
*1: https://docs.microsoft.com/en-us/cpp/preprocessor/once
*2: https://gcc.gnu.org/onlinedocs/cppinternals/Guard-Macros.html
Notes:
Merged: https://github.com/ruby/ruby/pull/3023
|
|
|
|
Accessing past the end of an array is technically UB. Use C99 flexible
array member instead to avoid the UB and simplify allocation size
calculation.
See also: DCL38-C in the SEI CERT C Coding Standard
Notes:
Merged: https://github.com/ruby/ruby/pull/3017
Merged-By: XrXr
|
|
|
|
between rb_scan_args_set and rb_scan_args_assign +
rb_scan_args_result.
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3000
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3000
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3000
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3000
|
|
View the help message wth pager designed by RUBY_PAGER or PAGER
environment variable, unless that value is empty.
Notes:
Merged: https://github.com/ruby/ruby/pull/3000
|
|
Fastpath has not been used for invokesuper since it has set vm_call_super_method on every invocation.
Because it seems to be blocked only by refinements, try enabling fastpath on invokesuper when cme is not for refinements.
While this patch itself should be helpful for VM performance, a part of this patch's motivation is to unblock inlining invokesuper on JIT.
$ benchmark-driver -v --rbenv 'before;after' benchmark/vm2_super.yml --repeat-count=4
before: ruby 2.8.0dev (2020-04-11T15:19:58Z master a01bda5949) [x86_64-linux]
after: ruby 2.8.0dev (2020-04-12T02:00:08Z invokesuper-fastpath c171984ee3) [x86_64-linux]
Calculating -------------------------------------
before after
vm2_super 20.031M 32.860M i/s - 6.000M times in 0.299534s 0.182593s
Comparison:
vm2_super
after: 32859885.2 i/s
before: 20031097.3 i/s - 1.64x slower
Notes:
Merged-By: k0kubun <takashikkbn@gmail.com>
|
|
|
|
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3018
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3018
|
|
`Dir.entries` returns an array.
Notes:
Merged: https://github.com/ruby/ruby/pull/3018
|
|
This is my first attempt at a pull request. I was reading the ruby docs
the other day and noticed that the output didn't match the code sample
on the with_object documentation. Inserted spaces to fix it.
Notes:
Merged: https://github.com/ruby/ruby/pull/2984
|
|
On some architectures (like RISC-V) sub-word atomics are only available
when linking against -latomic, but the configure script doesn't do that,
causing the atomic checks to fail and the resulting ruby binary is
non-functional. Ruby does not use sub-word atomic operations, rb_atomic_t
is defined to unsigned int, so use unsigned int when checking for atomic
operations.
Notes:
Merged: https://github.com/ruby/ruby/pull/3016
|
|
Raise `SignalException` for SIGPIPE to abort when EPIPE occurs.
Notes:
Merged: https://github.com/ruby/ruby/pull/3013
Merged-By: nobu <nobu@ruby-lang.org>
|
|
|
|
|
|
|
|
Same as 133ae0807d661eac174b59c6e91c11a40975baea
|
|
It should not be linked to `Process.clock_getes`.
|
|
Revert "Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler""
Revert "include/ruby/3/core/rtypeddata.h: Use 0 instead of NULL for C++ compiler"
Revert "include/ruby/3: Skip RUBY3_UNREACHABLE_RETURN for icc"
Revert "include/ruby/3: Stop RUBY3_UNREACHABLE_RETURN to suppress a SunC warning"
This reverts commit b965e7e05e4307e3c4b396673e63dbc493ef2f20.
This reverts commit d2bb2e066b5a914283dd3ea473fc1762183af013.
This reverts commit 8ab4c55e7a70f5a5bd041d93f425eeef4a47c01e.
This reverts commit 78eec3cdc5ff0664b421e041f4f70a814542b914.
After https://github.com/ruby/ruby/pull/3011, we no longer need these
ifdef guards.
|
|
* [Bug #16740]
* Remove the GETTIMEOFDAY_BASED_CLOCK_REALTIME example because the
caveat applies to all clock ids, not just the Symbol clock ids.
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/2996
|
|
|
|
This changes the following warnings:
* warning: class variable access from toplevel
* warning: class variable @foo of D is overtaken by C
into RuntimeErrors. Handle defined?(@@foo) at toplevel
by returning nil instead of raising an exception (the previous
behavior warned before returning nil when defined? was used).
Refactor the specs to avoid the warnings even in older versions.
The specs were checking for the warnings, but the purpose of
the related specs as evidenced from their description is to
test for behavior, not for warnings.
Fixes [Bug #14541]
Notes:
Merged: https://github.com/ruby/ruby/pull/2987
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
icc warns at this line.
> include/ruby/3/core/rstring.h(126): warning #413: variable "retval" has an uninitialized const field
> struct RString retval;
> ^
This must not be a problem because uninitialized const field is not used
at all. But the warnings are annoying. Let us suppress them.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
icc warns side effects for RUBY3_ASSUME like this:
> ./include/ruby/3/value_type.h(202): warning #2261: __assume expression with side effects discarded
> RUBY3_ASSUME(RB_FLONUM_P(obj));
> ^
Which is a false positive (RB_FLONUM_P has no side effect). It seems
there is no way for us to tell icc that a functin is safe inside of
__assume. Just suppress the warning instead.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
To this date there is no way for Oracle developer Studio to suppress
warnings about unreachable codes (12.6 manual says it implemented
__builtin_unreachable "as a no-op to C++. It might be added to C.")
There is no way but globally kill the warning.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
Every time a pointer to/from VALUE conversion happens, these two
warnings are issued:
- warning #1684: conversion from pointer to same-sized integral type (potential portability problem)
- warning #2312: pointer cast involving 64-bit pointed-to type
Thank you, but we are well aware of the "potential portability problem".
Let us ignore them all.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
Non-gcc compilers tend to have this intrinsic these days (e.g. icc).
Better check it regardless of $GCC.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
This macro has to be truthy, otherwise the `+0` trick above evalues
RUBY3_HAS_BUILTIN(__builtin_unreachable) to be always false.
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
Namely icc defines __GNUC__, but doesn't have -Wdeprecated-declarations
Notes:
Merged: https://github.com/ruby/ruby/pull/3011
|
|
[Feature #15921]
Notes:
Merged: https://github.com/ruby/ruby/pull/3012
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3010
|
|
Without this patch, 20k files are opened (openat syscall) because
of duplicate includes. This patch reduced it to 3k and build time
was reduced compile time of range.o from 15sec -> 3sec on my machine.
[Bug #16772]
Notes:
Merged: https://github.com/ruby/ruby/pull/3010
|
|
Only writing the inspected result and a newline is
uninterruptible.
|
|
|
|
|
|
|