| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
sequences (#3870)
[Bug #17218]
[ruby-core:100312]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* numeric.c: prohibit zero step in Numeric#step
* range.c: prohibit zero step in Range#step
* Fix ruby-spec
[Feature #15573]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The error message has an integer overflow because it treats an unsigned int as a signed int.
Before:
```
> 3_000_000_000.chr
-1294967296 out of char range (RangeError)
```
After:
```
> 3_000_000_000.chr
3000000000 out of char range (RangeError)
```
Redmine ticket: https://bugs.ruby-lang.org/issues/17186
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
|
| |
We can obtain the verbatim source code of Primitive.cexpr!. Why not
paste that content into the JITed program.
|
|
|
|
|
|
| |
Not every compilers understand that rb_raise does not return. When a
function does not end with a return statement, such compilers can issue
warnings. We would better tell them about reachabilities.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
|
|
|
|
| |
I'm not necessarily against every goto in general, but jumping into a
branch is definitely a bad idea. Better refactor.
|
| |
|
|
|
|
|
|
|
| |
A prerequisite to fix https://bugs.ruby-lang.org/issues/15589 with JIT.
This commit alone doesn't make a significant difference yet, but I thought
this commit should be committed independently.
This method override was discussed in [Misc #16961].
|
|
|
|
|
|
|
| |
* remove else if & rb_funcall
* fix int_even_p impl
* fix rb_int_odd_p implementation
|
| |
|
|
|
|
|
|
| |
It would be a relatively frequent case. It is still slower than
`float * float` because `*` has a dedicated VM instruction (opt_mult),
though.
|
|
|
|
| |
To fix build failures.
|
|
|
|
| |
This shall fix compile errors.
|
| |
|
|
|
|
| |
b cannot be <= 0 here. Found by Coverity Scan
|
| |
|
| |
|
|
|
| |
Split ruby.h
|
| |
|
|
|
|
| |
Fixes [Bug #16044]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Saves comitters' daily life by avoid #include-ing everything from
internal.h to make each file do so instead. This would significantly
speed up incremental builds.
We take the following inclusion order in this changeset:
1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very
first thing among everything).
2. RUBY_EXTCONF_H if any.
3. Standard C headers, sorted alphabetically.
4. Other system headers, maybe guarded by #ifdef
5. Everything else, sorted alphabetically.
Exceptions are those win32-related headers, which tend not be self-
containing (headers have inclusion order dependencies).
|
|
|
|
|
|
|
| |
With these macros implemented we can write codes just like we can assume
the compiler being clang. MSC_VERSION_SINCE is defined to implement
those macros, but turned out to be handy for other places. The -fdeclspec
compiler flag is necessary for clang to properly handle __has_declspec().
|
|
|
|
|
|
|
| |
These functions are used from within a compilation unit so we can
make them static, for better binary size. This changeset reduces
the size of generated ruby binary from 26,590,128 bytes to
26,584,472 bytes on my macihne.
|
| |
|
|
|
|
|
| |
Though it won't happen in the real world in this context, FIX2INT may
raise an exception and it cause to generate extra code.
|
|
|
|
|
|
| |
* numeric.c (num_step): pass the extracted argument from keyword
argument, not the last argument itself which should have been
warned already.
|
| |
|
| |
|
|
|
|
| |
[Bug #16044]
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
only when its receiver and the argument are both Integers.
Since 6bedbf4625, Integer#[] has supported a range extraction.
This means that Integer#[] now accepts multiple arguments, which made
the method very slow unfortunately.
This change fixes the performance issue by adding a special handling for
its traditional use case: `num[idx]` where both `num` and `idx` are
Integers.
|
|
|
|
| |
[Misc #15775][ruby-core:92332]
|
| |
|