aboutsummaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* Added `rb_random_base_init`Nobuyoshi Nakada2020-09-071-0/+1
| | | | To enclose the initialization of Random::Base part.
* Added WITH_REAL macrosNobuyoshi Nakada2020-09-071-4/+10
| | | | | | Added `WITH_REAL` versions to `RB_RANDOM_INTERFACE` macros. Also these macros including "without real" versions no longer contain the terminator (semicolon and comma).
* Added `get_real` interfaceNobuyoshi Nakada2020-09-071-0/+2
|
* Added rb_int_pair_to_realNobuyoshi Nakada2020-09-071-2/+1
|
* separate rb_random_tNobuyoshi Nakada2020-09-071-0/+80
| | | | | | | | | | | | * random.c: separate abstract rb_random_t and rb_random_mt_t for Mersenne Twister implementation. * include/ruby/random.h: the interface for extensions of Random class. * DLL imported symbol reference is not constant on Windows. * check if properly initialized.
* Add `RB_` prefix for size_t to number conversion.Samuel Williams2020-09-061-12/+17
|
* Introduce Ractor mechanism for parallel executionKoichi Sasada2020-09-031-0/+1
| | | | | | | | | | | | | | | | This commit introduces Ractor mechanism to run Ruby program in parallel. See doc/ractor.md for more details about Ractor. See ticket [Feature #17100] to see the implementation details and discussions. [Feature #17100] This commit does not complete the implementation. You can find many bugs on using Ractor. Also the specification will be changed so that this feature is experimental. You will see a warning when you make the first Ractor with `Ractor.new`. I hope this feature can help programmers from thread-safety issues.
* Version number bumped to 3.0.0 from 2.8.0 (tentative).Yukihiro "Matz" Matsumoto2020-08-311-2/+2
| | | | We have decided to go forward to 3.0 this year.
* Fix a typo [ci skip]Kazuhiro NISHIYAMA2020-08-291-1/+1
|
* include/ruby/backward/2/rmodule.h: deprecate卜部昌平2020-08-272-1/+6
| | | | | Only one function in only one file uses contents of this public header. That is not a wise idea. Let's just free the header's soul.
* RUBY_SHOW_COPYRIGHT_TO_DIE: flip the default卜部昌平2020-08-271-5/+2
| | | | | | | | | | Commit 7aab062ef3772c7e8e50fc872a1647918c76dbba says: > ruby_show_version() will no longer exits the process, if > RUBY_SHOW_COPYRIGHT_TO_DIE is set to 0. This will be the default in > the future. 3.0 is a good timing for that "future".
* include/ruby/backward/2/r_cast.h: deprecate卜部昌平2020-08-272-1/+6
| | | | | Remove all usages of RCAST() so that the header file can be excluded from ruby/ruby.h's dependency.
* improve deprecation warning卜部昌平2020-08-271-7/+4
| | | | We should not recommend RBIMPL_*.
* DEPRECATED_TYPE: is deprecated卜部昌平2020-08-271-1/+17
| | | | Nobody uses this macro any longer.
* RClassDeprecated: delete卜部昌平2020-08-271-9/+0
| | | | It has been deprecated for 5 years since 1f2255604087e9a7d7efcb2df61b5ca0e2daa200.
* git rm include/ruby/backward/rubyio.h卜部昌平2020-08-271-18/+0
|
* git rm include/ruby/backward/rubysig.h卜部昌平2020-08-271-26/+0
|
* git rm include/ruby/backward/{st,util}.h卜部昌平2020-08-272-36/+0
|
* git rm include/ruby/backward/classext.h卜部昌平2020-08-271-25/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-1/+0
|
* git rm include/ruby/backward/2/extern.h卜部昌平2020-08-271-46/+0
|
* HAVE_STMT_AND_DECL_IN_EXPR: not for Sun C++卜部昌平2020-08-211-0/+8
| | | | | | Because we check HAVE_STMT_AND_DECL_IN_EXPR in configure, it is peoven to work in C. But C++ situation can be different. Oracle Developer Studio is another example of such things.
* RBIMPL_HAS_CPP_ATTRIBUTE: handle SunPro卜部昌平2020-08-211-2/+10
| | | | | | | Oracle Developer Studio's C++ preprocessor started to understand __has_cpp_attribute since version 12.5, and is broken. After looking around for a while I found Boost and ICU also had this issue before. Let me add workaround for it.
* ROBJECT_IV_INDEX_TBL: convert into an inline function卜部昌平2020-08-191-5/+21
| | | | | | | Former ROBJECT_IV_INDEX_TBL macro included RCLASS_IV_INDEX_TBL, which is not disclosed to extension libraies. The macro was kind of broken. Why not just deprecate it, and convert the internal use into an inline function.
* RARRAY_AREF: convert into an inline function卜部昌平2020-08-151-15/+10
| | | | | | RARRAY_AREF has been a macro for reasons. We might not be able to change that for public APIs, but why not relax the situation internally to make it an inline function.
* Enable arm64 optimizations that exist for power/x86 (#3393)AGSaidi2020-08-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable unaligned accesses on arm64 64-bit Arm platforms support unaligned accesses. Running the string benchmarks this change improves performance by an average of 1.04x, min .96x, max 1.21x, median 1.01x * arm64 enable gc optimizations Similar to x86 and powerpc optimizations. | |compare-ruby|built-ruby| |:------|-----------:|---------:| |hash1 | 0.225| 0.237| | | -| 1.05x| |hash2 | 0.110| 0.110| | | 1.00x| -| * vm_exec.c: improve performance for arm64 | |compare-ruby|built-ruby| |:------------------------------|-----------:|---------:| |vm_array | 26.501M| 27.959M| | | -| 1.06x| |vm_attr_ivar | 21.606M| 31.429M| | | -| 1.45x| |vm_attr_ivar_set | 21.178M| 26.113M| | | -| 1.23x| |vm_backtrace | 6.621| 6.668| | | -| 1.01x| |vm_bigarray | 26.205M| 29.958M| | | -| 1.14x| |vm_bighash | 504.155k| 479.306k| | | 1.05x| -| |vm_block | 16.692M| 21.315M| | | -| 1.28x| |block_handler_type_iseq | 5.083| 7.004| | | -| 1.38x|
* sync NDEBUG, RUBY_DEBUG, and RUBY_NDEBUG (#3327)卜部昌平2020-08-074-45/+169
| | | | | | - When NDEBUG is defined that shall be honoured. - When RUBY_DEBUG is defined that shall be honoured. - When both are defined and they conflict, warnings shall be rendered. - When nothing is specified, nothing shall happen.
* include/ruby/util.h: delete unused codes卜部昌平2020-07-231-21/+0
| | | | | | | | - util.h includes defines.h, - ... which includes ruby/backward/2/stdarg.h, - ... which always defines _. This `#ifndef _` must never happen.
* Move declarations to private `internal/thread.h` header.Samuel Williams2020-07-201-5/+0
|
* Rename `rb_current_thread_scheduler` to `rb_thread_scheduler_if_nonblocking`.Samuel Williams2020-07-201-1/+2
| | | | | Correctly capture thread before releasing GVL and pass as argument to `rb_thread_scheduler_if_nonblocking`.
* Revert "RBIMPL_UNREACHABLE_RETURN: evaluate the argument"卜部昌平2020-06-291-1/+1
| | | | | | This reverts commit c8dc2bf1401fc01d35a4a7587ed224f1f2fe29e6. No longer necessary.
* RBIMPL_UNREACHABLE_RETURN: evaluate the argument卜部昌平2020-06-291-1/+1
| | | | Prevent casual typos inside of UNREACHABLE_RETURN(...).
* RUBY_ASSERT_NOASSUMEKoichi Sasada2020-05-291-1/+1
| | | | | | | | | If __builtin_assume() is enables and RUBY_DEBUG=0, RUBY_ASSERT(expr) will be compiled to __builtin_assume(expr) and compiler can assume expr is true and apply aggressive optimizations. However we observed doubtful behavior because of compiler optimizations, we introduce new macro RUBY_ASSERT_NOASSUME to disable __builtin_assume(). With this macro, we can try without __builtin_assume().
* Removed a trailing space [ci skip]Nobuyoshi Nakada2020-05-271-1/+1
|
* Get rid of redefinition of memcpy on mingwNobuyoshi Nakada2020-05-261-0/+2
|
* Update include/ruby/assert.hKoichi Sasada2020-05-261-1/+7
| | | Co-authored-by: 卜部昌平 <shyouhei@ruby-lang.org>
* Use RUBY_DEBUG instead of NDEBUGKoichi Sasada2020-05-2618-74/+79
| | | | | | | | | | | | | | Assertions in header files slows down an interpreter, so they should be turned off by default (simple `make`). To enable them, define a macro `RUBY_DEBUG=1` (e.g. `make cppflags=-DRUBY_DEBUG` or use `#define` at the very beggining of the file. Note that even if `NDEBUG=1` is defined, `RUBY_DEBUG=1` enables all assertions. [Feature #16837] related: https://github.com/ruby/ruby/pull/3120 `assert()` lines in MRI *.c is not disabled even if `RUBY_DEBUG=0` and it can be disabled with `NDEBUG=1`. So please consider to use `RUBY_ASSERT()` if you want to disable them when `RUBY_DEBUG=0`.
* RBIMPL_ATTR_DEPRECATED: disable for GCC10卜部昌平2020-05-251-0/+4
| | | | GCC 10.x seems buggy here. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95302
* Added UNREACHABLE_RETURNNobuyoshi Nakada2020-05-211-0/+1
| | | | To get rid of a void function at the end of non-void function.
* rb_scan_args_set: make it slightly readable卜部昌平2020-05-211-7/+13
| | | | | This is a pure refactoring that improves understanding of what is going on. Not a big win though.
* Use __bultin_assume() from clang-7Koichi Sasada2020-05-201-1/+1
| | | | | | | We observed combination of multiple __builtin_assume() can cause strange compile results on clang-6 (-DNDEBUG exposed this issue). To avoid this problem, __builtin_assume() is from clang-7. https://github.com/ruby/ruby/pull/3120#issuecomment-630821333
* Thread scheduler for light weight concurrency.Samuel Williams2020-05-142-0/+5
|
* Removed extra stringizationNobuyoshi Nakada2020-05-122-3/+3
| | | | | Argument of RUBY_ASSERT_FAIL is already stringized message, so no more extra stringization should be applied.
* fix sunpro pragma卜部昌平2020-05-111-5/+1
| | | | | SunPro's #pragma does_not_return(...) needs an argument. That does not fit the attribute syntax we employ.
* drop varargs.h support卜部昌平2020-05-111-5/+1
| | | | | This header file is simply out of date (for decades since at least 1989). It's the 21st century. Just stop using it.
* rb_str_new: hoist RB_CONSTANT_P out of function卜部昌平2020-05-111-118/+82
| | | | | | | | | | | https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html says: > GCC never returns 1 when you call the inline function with a string > constant or ... Because rb_str_new and familiy take string constants, it was a bad idea for them to contain RB_CONSTANT_P. We should instead do so in corresponding macros. [ruby-core:98212]
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-11158-673/+673
| | | | To fix build failures.
* mv include/ruby/{impl,internal}卜部昌平2020-05-11143-0/+0
| | | | Devs do not love "impl".
* spaces in comments [ci skip]卜部昌平2020-05-114-12/+12
|
* sed -i s/ruby3/rbimpl/g卜部昌平2020-05-11156-241/+241
|