summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-14Improve Hash documentation.Burdette Lamar
Notes: Merged: https://github.com/ruby/ruby/pull/3002 Merged-By: ioquatix <samuel@codeotaku.com>
2020-04-13Allow simple R-assign in endless defNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3025
2020-04-13delete CACHELINE卜部昌平
Since https://github.com/ruby/ruby/pull/2888 this macro is no longer used in any place.
2020-04-13include what you use.卜部昌平
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
2020-04-13add #include guard hack卜部昌平
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
2020-04-12Add MJIT_COUNTER macro to dump total_callsTakashi Kokubun
2020-04-12Avoid UB with flexible array memberAlan Wu
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
2020-04-13* 2020-04-13 [ci skip]git
2020-04-12Make rb_scan_args implementations sameNobuyoshi Nakada
between rb_scan_args_set and rb_scan_args_assign + rb_scan_args_result.
2020-04-12Honor COLUMNS [Feature #16754]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3000
2020-04-12Hightlight usage [Feature #16754]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3000
2020-04-12Set up environment variable for pager [Feature #16754]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3000
2020-04-12PAGER without fork&exec too [Feature #16754]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3000
2020-04-12View the help message with PAGER [Feature #16754]Nobuyoshi Nakada
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
2020-04-11Enable fastpath on invokesuper (#3021)Takashi Kokubun
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>
2020-04-12* 2020-04-12 [ci skip]git
2020-04-12Relaxed of R-assign value to argNobuyoshi Nakada
2020-04-11Support version ranges for MSVC [Feature #16763]Nobuyoshi Nakada
2020-04-11Assertions for basic use of `encoding:` optionNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3018
2020-04-11Assertions for enumerators of DirNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/3018
2020-04-11Removed unnecessary `to_a` callNobuyoshi Nakada
`Dir.entries` returns an array. Notes: Merged: https://github.com/ruby/ruby/pull/3018
2020-04-11[ci skip] Enumerator doc cleanupgerero20
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
2020-04-11Don't require sub-word atomicsAndreas Schwab
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
2020-04-11Silence broken pipe error messages on STDOUT [Feature #14413]Nobuyoshi Nakada
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>
2020-04-11Fix articles.Tanaka Akira
2020-04-11* 2020-04-11 [ci skip]git
2020-04-11Replace Fixnum by Integer in a document.Tanaka Akira
2020-04-10RUBY3_HAS_ATTRIBUTE: fix fallbacks卜部昌平
Same as 133ae0807d661eac174b59c6e91c11a40975baea
2020-04-10[DOC] Fixed POSIX clock_getres(3) link [ci skip]Nobuyoshi Nakada
It should not be linked to `Process.clock_getes`.
2020-04-10include/ruby/3: do not skip RUBY3_UNREACHABLE_RETURN卜部昌平
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.
2020-04-10Warn about Process#clock_getres being unreliable in documentationBenoit Daloze
* [Bug #16740] * Remove the GETTIMEOFDAY_BASED_CLOCK_REALTIME example because the caveat applies to all clock ids, not just the Symbol clock ids.
2020-04-10Reference to [Feature #16746] [ci skip]Nobuyoshi Nakada
2020-04-10Endless method definition [Feature #16746]Nobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/2996
2020-04-10R-assign is still experimental [Feature #15921] [ci skip]Nobuyoshi Nakada
2020-04-10Turn class variable warnings into exceptionsJeremy Evans
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
2020-04-10ext/-test-/cxxanyargs: add #pragma for icc.卜部昌平
Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-10ruby3_rstring_getmem: suppres warning卜部昌平
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
2020-04-10RUBY3_ASSUME: suppress warnings on icc卜部昌平
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
2020-04-10configure: suppress SunPro warning卜部昌平
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
2020-04-10configure: suppress icc warnings卜部昌平
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
2020-04-10configure: always check for __builtin_unreachable卜部昌平
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
2020-04-10RUBY3_HAS_BUILTIN: fix __builtin_unreachable卜部昌平
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
2020-04-10mjit_worker: __GNUC__ is too lax卜部昌平
Namely icc defines __GNUC__, but doesn't have -Wdeprecated-declarations Notes: Merged: https://github.com/ruby/ruby/pull/3011
2020-04-10Rightward-assign by ASSOCNobuyoshi Nakada
[Feature #15921] Notes: Merged: https://github.com/ruby/ruby/pull/3012
2020-04-10update dependenciesKoichi Sasada
Notes: Merged: https://github.com/ruby/ruby/pull/3010
2020-04-10reduce duplicate include.Koichi Sasada
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
2020-04-10Make `#inspect` interruptible in `Kernel#p`Nobuyoshi Nakada
Only writing the inspected result and a newline is uninterruptible.
2020-04-10* 2020-04-10 [ci skip]git
2020-04-10Constified writev function familyNobuyoshi Nakada
2020-04-09Fixed to initialize ruby-core repository when it has no master branchHiroshi SHIBATA