Age | Commit message (Collapse) | Author |
|
https://github.com/ruby/irb/commit/5044eb2730
|
|
https://github.com/ruby/irb/commit/82efd370eb
|
|
https://github.com/ruby/irb/commit/71ba754e8e
|
|
https://github.com/ruby/irb/commit/826ae909c9
|
|
```
/home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:9:
warning: ambiguous first argument; put parentheses or a space even after
`/' operator
/home/chkbuild/chkbuild/tmp/build/20200818T033004Z/ruby/test/fiber/test_backtrace.rb:15:
warning: ambiguous first argument; put parentheses or a space even after
`/' operator
```
|
|
```
1) Failure:
TestObjSpace#test_trace_object_allocations [/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb:175]:
<nil> expected but was
<"/tmp/ruby/v3/src/trunk-gc_compact/test/objspace/test_objspace.rb">.
```
@tenderlove will re-enable it soon.
|
|
Before this commit, iclasses were "shady", or not protected by write
barriers. Because of that, the GC needs to spend more time marking these
objects than otherwise.
Applications that make heavy use of modules should see reduction in GC
time as they have a significant number of live iclasses on the heap.
- Put logic for iclass method table ownership into a function
- Remove calls to WB_UNPROTECT and insert write barriers for iclasses
This commit relies on the following invariant: for any non oirigin
iclass `I`, `RCLASS_M_TBL(I) == RCLASS_M_TBL(RBasic(I)->klass)`. This
invariant did not hold prior to 98286e9 for classes and modules that
have prepended modules.
[Feature #16984]
Notes:
Merged: https://github.com/ruby/ruby/pull/3410
|
|
|
|
It's possible to define methods with any name, even if the parser
doesn't support it and it can only be used with ex. send.
This fixes an issue where invalid JSON was output from ObjectSpace.dump
when a method name needed escaping.
Notes:
Merged: https://github.com/ruby/ruby/pull/3383
|
|
As well as the other places using RCLASS_IV_INDEX_TBL.
`IO#reopen` seems the only case that the class of an object can be
changed.
|
|
|
|
|
|
See <https://bugs.ruby-lang.org/issues/16815> for more details.
Notes:
Merged: https://github.com/ruby/ruby/pull/3422
|
|
<https://bugs.ruby-lang.org/issues/16805>
Notes:
Merged: https://github.com/ruby/ruby/pull/3137
|
|
|
|
Just moved "case base" after allocating cache space.
|
|
|
|
This reverts commit 3a4be429b50062122d1616256de38649464d3146.
To fix following warning:
```
compiling ../compile.c
../compile.c:6336:20: warning: variable 'line' is uninitialized when used here [-Wuninitialized]
ADD_INSN(head, line, putnil); /* allocate stack for cached #deconstruct value */
^~~~
../compile.c:220:57: note: expanded from macro 'ADD_INSN'
ADD_ELEM((seq), (LINK_ELEMENT *) new_insn_body(iseq, (line), BIN(insn), 0))
^~~~
../compile.c:6327:13: note: initialize the variable 'line' to silence this warning
int line;
^
= 0
1 warning generated.
```
|
|
This was deprecated in 2.7 to resolve [Misc #15893].
Notes:
Merged: https://github.com/ruby/ruby/pull/3377
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3403
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3401
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3401
|
|
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/3419
|
|
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.
Notes:
Merged: https://github.com/ruby/ruby/pull/3419
|
|
|
|
* Fix links to Dig Methods document
* Fix links to Dig Methods document
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
|
|
by adding MAYBE_UNUSED.
|
|
Adds a full discussion of #dig, along with links from Array, Hash, Struct, and OpenStruct.
CSV::Table and CSV::Row are over in ruby/csv. I'll get to them soon.
The art to the thing is to figure out how much (or how little) to say at each #dig.
Notes:
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
|
|
|
|
* 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|
Notes:
Merged-By: nurse <naruse@airemix.jp>
|
|
As now RSTRING_PTR and RSTRING_LEN are functions, they very bother
stepping in/out during debugging.
|
|
When the pattern Regexp given to String#index and String#rindex
contain a /\K/ (lookbehind) operator, these methods return the
position where the beginning of the lookbehind pattern matches, while
they are expected to return the position where the \K matches.
```
# without patch
"abcdbce".index(/b\Kc/) # => 1
"abcdbce".rindex(/b\Kc/) # => 4
```
This patch fixes this problem by using BEG(0) instead of the return
value of rb_reg_search.
```
# with patch
"abcdbce".index(/b\Kc/) # => 2
"abcdbce".rindex(/b\Kc/) # => 5
```
Fixes [Bug #17118]
Notes:
Merged: https://github.com/ruby/ruby/pull/3414
|
|
When the pattern given to String#partition and String#rpartition
contain a /\K/ (lookbehind) operator, the methods return strings
sliced at incorrect positions.
```
# without patch
"abcdbce".partition(/b\Kc/) # => ["a", "c", "cdbce"]
"abcdbce".rpartition(/b\Kc/) # => ["abcd", "c", "ce"]
```
This patch fixes the problem by using BEG(0) instead of the return
value of rb_reg_search.
```
# with patch
"abcdbce".partition(/b\Kc/) # => ["ab", "c", "dbce"]
"abcdbce".rpartition(/b\Kc/) # => ["abcdb", "c", "e"]
```
As a side-effect this patch makes String#partition 2x faster when the
pattern is a costly Regexp by performing Regexp search only once,
which was unexpectedly done twice in the original implementation.
Fixes [Bug #17119]
Notes:
Merged: https://github.com/ruby/ruby/pull/3413
|
|
Old gcc (< 5 maybe?) warns that this variable is not initialized:
debug.c: In function 'ruby_debug_log':
debug.c:441:13: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (r && len < MAX_DEBUG_LOG_MESSAGE_LEN) {
^
I don't know if that is true, but adding "= 0" here must harm no one.
Notes:
Merged: https://github.com/ruby/ruby/pull/3411
|
|
This reverts commit c355fa72d4e356378a8b03a67432b52bafcc308b.
Notes:
Merged: https://github.com/ruby/ruby/pull/3411
|
|
This reverts commit f2d7461e85053cb084e10999b0b8019b0c29e66e.
Some CI machines are reporting issues with backtrace_mark, so I'm
going to revert this for now.
|
|
|
|
Previously, backtrace_each fully populated the rb_backtrace_t with all
backtrace frames, even if caller only requested a partial backtrace
(e.g. Kernel#caller_locations(1, 1)). This changes backtrace_each to
only add the requested frames to the rb_backtrace_t.
To do this, backtrace_each needs to be passed the starting frame and
number of frames values passed to Kernel#caller or #caller_locations.
backtrace_each works from the top of the stack to the bottom, where the
bottom is the current frame. Due to how the location for cfuncs is
tracked using the location of the previous iseq, we need to store an
extra frame for the previous iseq if we are limiting the backtrace and
final backtrace frame (the first one stored) would be a cfunc and not
an iseq.
To limit the amount of work in this case, while scanning until the start
of the requested backtrace, for each iseq, store the cfp. If the first
backtrace frame we care about is a cfunc, use the stored cfp to find the
related iseq. Use a function pointer to handle the storage of the cfp
in the iteration arg, and also store the location of the extra frame
in the iteration arg.
backtrace_each needs to return int instead of void in order to signal
when a starting frame larger than backtrace size is given, as caller
and caller_locations needs to return nil and not the empty array in
these cases.
To handle cases where a range is provided with a negative end, and the
backtrace size is needed to calculate the result to pass to
rb_range_beg_len, add a backtrace_size static function to calculate
the size, which copies the logic from backtrace_each.
As backtrace_each only adds the backtrace lines requested,
backtrace_to_*_ary can be simplified to always operate on the entire
backtrace.
Previously, caller_locations(1,1) was about 6.2 times slower for an
800 deep callstack compared to an empty callstack. With this new
approach, it is only 1.3 times slower. It will always be somewhat
slower as it still needs to scan the cfps from the top of the stack
until it finds the first requested backtrace frame.
Fixes [Bug #17031]
Notes:
Merged: https://github.com/ruby/ruby/pull/3357
|