summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-10[ruby/irb] Make $ and @ default aliasesTakashi Kokubun
(https://github.com/ruby/irb/pull/438) https://github.com/ruby/irb/commit/0613589476
2022-11-11[Bug #19100] [DOC] Add NEWS about PRNG update and incompatiblityNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6697
2022-11-10Set up EXTSTATIC before checking itAlan Wu
The bundle_loader check for darwin checks EXTSTATIC, but previously the setup for the variable comes after the check. I had trouble building using --with-static-linked-ext on darwin before this change. Notes: Merged: https://github.com/ruby/ruby/pull/6675 Merged-By: XrXr
2022-11-10Remove numiv from RObjectJemma Issroff
Since object shapes store the capacity of an object, we no longer need the numiv field on RObjects. This gives us one extra slot which we can use to give embedded objects one more instance variable (for a total of 3 ivs). This commit removes the concept of numiv from RObject. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Transition shape when object's capacity changesJemma Issroff
This commit adds a `capacity` field to shapes, and adds shape transitions whenever an object's capacity changes. Objects which are allocated out of a bigger size pool will also make a transition from the root shape to the shape with the correct capacity for their size pool when they are allocated. This commit will allow us to remove numiv from objects completely, and will also mean we can guarantee that if two objects share shapes, their IVs are in the same positions (an embedded and extended object cannot share shapes). This will enable us to implement ivar sets in YJIT using object shapes. Co-Authored-By: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Omit test on IO Buffers which relies on String being embeddedJemma Issroff
There is currently a bug ([#19084]) in how extended strings work in IO Buffers. Object Shapes changes will make the string in this test extended on 32 bit machines. Since this behavior is currently broken (unrelated to object shapes) on 32 bit machines, this test will then fail. We preemptively omit it so that this commit can be reverted once the bug is fixed. Notes: Merged: https://github.com/ruby/ruby/pull/6699
2022-11-10Fix bug in array pack with shared stringsJemma Issroff
If string literals are long and they become shared, we need to make them independent before we can write to them. [Bug #19116] Notes: Merged: https://github.com/ruby/ruby/pull/6704
2022-11-10Fix compiler issues in test on C99Peter Zhu
Fixes the following issue when compiling using C99: ext/-test-/rb_call_super_kw/rb_call_super_kw.c ext/-test-/random/loop.c:16:39: error: extra ';' outside of a function [-Werror,-Wextra-semi] RB_RANDOM_DEFINE_INIT_INT32_FUNC(loop);
2022-11-10[Bug #19100] Add `init_int32` function to `rb_random_interface_t`Nobuyoshi Nakada
Distinguish initialization by single word from initialization by array.
2022-11-10Add version to the interface of Random extensionsNobuyoshi Nakada
2022-11-10Adjust indents [ci skip]Nobuyoshi Nakada
2022-11-10Preprocess for older bison is no longer neededNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6701
2022-11-10Update required Bison version in building_ruby.md [ci skip]yui-knk
See [Feature #19068] for the context. Notes: Merged: https://github.com/ruby/ruby/pull/6705
2022-11-09Fix exit locations dump (#6703)Eileen M. Uchitelle
While I was working on my RubyConf talk for tracing yjit exit locations I realized that there were exits from the dump code included in the stats data. For example I saw 224 interp leave exits for a simple script that should have had 1 or 2. I realized that the dump code needs to be called _after_ the stats are generated, otherwise the dump code will be counted in the stats exits. I've added a `_dump_locations` method to the `at_exit` for stats generation to ensure that it runs last. I've updated the documentation to add a note that if you call `dump_exit_locations` directly, your stats will include the dump code exits as well. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-09[DOC] Enhanced RDoc for IO (#6669)Burdette Lamar
Notes: Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
2022-11-09Reduce warningsTSUYUSATO Kitsune
2022-11-09Use long instead of intTSUYUSATO Kitsune
2022-11-09Check for integer overflow in the allocation of match_cache tableYusuke Endoh
2022-11-09Ensure that the table size for CACHE_MATCH fits with intYusuke Endoh
Currently, the keys for CACHE_MATCH are handled as an `int` type. So we should make sure the table size are smaller than the range of `int`.
2022-11-09Prevent GCC warningsYusuke Endoh
``` regexec.c: In function ‘reset_match_cache’: regexec.c:1259:56: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses] 1259 | match_cache[k1 >> 3] &= ((1 << (8 - (k2 & 7) - 1)) - 1 << ((k2 & 7) + 1)) | ((1 << (k1 & 7)) - 1); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ regexec.c:1269:60: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses] 1269 | match_cache[k2 >> 3] &= ((1 << (8 - (k2 & 7) - 1)) - 1 << ((k2 & 7) + 1)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ regexec.c: In function ‘find_cache_index_table’: regexec.c:1192:11: warning: ‘m’ may be used uninitialized [-Wmaybe-uninitialized] 1192 | if (!(0 <= m && m < num_cache_table && table[m].addr == p)) { | ~~^~~~ regexec.c: In function ‘match_at’: regexec.c:1238:12: warning: ‘m1’ is used uninitialized [-Wuninitialized] 1238 | if (table[m1].addr < pbegin && m1 + 1 < num_cache_table) m1++; | ^ regexec.c:1218:39: note: ‘m1’ was declared here 1218 | int l = 0, r = num_cache_table - 1, m1, m2; | ^~ regexec.c:1239:12: warning: ‘m2’ is used uninitialized [-Wuninitialized] 1239 | if (table[m2].addr > pend && m2 - 1 > 0) m2--; | ^ regexec.c:1218:43: note: ‘m2’ was declared here 1218 | int l = 0, r = num_cache_table - 1, m1, m2; | ^~ ```
2022-11-09Return ONIGERR_MEMORY if it fails to allocate memory for cache_match_optYusuke Endoh
2022-11-09Revert "Refactor field names"TSUYUSATO Kitsune
This reverts commit 1e6673d6bbd2adbf555d82c7c0906ceb148ed6ee.
2022-11-09Refactor field namesTSUYUSATO Kitsune
2022-11-09Update timeout seconds for square testTSUYUSATO Kitsune
2022-11-09Update timeout secondsTSUYUSATO Kitsune
2022-11-09Fix and add regexp testsTSUYUSATO Kitsune
2022-11-09Remove debug printfTSUYUSATO Kitsune
2022-11-09Clear cache on OP_NULL_CHECK_END_MEMSTTSUYUSATO Kitsune
2022-11-09Support OP_REPEAT and OP_REPEAT_INCTSUYUSATO Kitsune
2022-11-09Reduce warningsTSUYUSATO Kitsune
2022-11-09Fix to compile when USE_CACHE_MATCH_OPT is disabledTSUYUSATO Kitsune
2022-11-09Enable optimization for PUSH_IF/OR opcodesTSUYUSATO Kitsune
2022-11-09Enable optimization for ANYCHAR_STAR opcodesTSUYUSATO Kitsune
2022-11-09Add index to the latest NULL_CHECK_STACK for fast matchingTSUYUSATO Kitsune
2022-11-09Add static declaration to new functionsTSUYUSATO Kitsune
2022-11-09Increment num_fail on OP_POP tooTSUYUSATO Kitsune
2022-11-09Fix look-around like operators and cclassTSUYUSATO Kitsune
2022-11-09Keep cache optimization info to MatchArg for global matchingTSUYUSATO Kitsune
2022-11-09Implement cache optimization for regexp matchingTSUYUSATO Kitsune
2022-11-09Now bison 3.0 or later is requiredNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/6698
2022-11-09Make pending_interrupt?(Exception) workYusuke Endoh
A patch from katsu (Katsuhiro Ueno) [Bug #19110] Notes: Merged: https://github.com/ruby/ruby/pull/6689
2022-11-09[DOC] Fix missing type nameNobuyoshi Nakada
2022-11-09Use `rb_sprintf` instead of deprecated `sprintf`Nobuyoshi Nakada
2022-11-08YJIT: Reset dropped_bytes when patching codeAlan Wu
We switch to a new page when we detect dropped_bytes flipping from false to true. Previously, when we patch code for invalidation during code gc, we start with the flag being set to true, so we failed to apply patches that straddle pages. We would write out jumps half way and then stop, which left the code corrupted. Reset the flag before patching so we patch across pages properly. Notes: Merged: https://github.com/ruby/ruby/pull/6686
2022-11-08YJIT: Improve checking message for rustc version (#6693)Alan Wu
Preivously we didn't have a "checking ...." line for this check and when rustc was too old, we would dump the error message to the console like: checking for rustc... rustc error: there is no argument named `x` --> <anon>:1:33 | 1 | fn main() { let x = 1; format!("{x}"); } | ^^^ error: aborting due to previous error `configure` checks usually don't do this and this might be confusing. With this commit it now says something like: checking whether rustc is new enough for YJIT... no Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-08Implement optimize call (#6691)Jimmy Miller
This dispatches to a c func for doing the dynamic lookup. I experimented with chain on the proc but wasn't able to detect which call sites would be monomorphic vs polymorphic. There is definitely room for optimization here, but it does reduce exits. Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-08[doc] Clarify how to build OpenSSL on macOSMatt Valentine-House
Notes: Merged: https://github.com/ruby/ruby/pull/6692
2022-11-08YJIT: Make more stats accessible from Ruby code (#6685)Takashi Kokubun
Notes: Merged-By: maximecb <maximecb@ruby-lang.org>
2022-11-08[ruby/irb] Add execute_lines to reduce command tests' boilerplateStan Lo
code (https://github.com/ruby/irb/pull/436) https://github.com/ruby/irb/commit/1595337149
2022-11-08[rubygems/rubygems] Add tests for universal Ruby with arch-specific prebuilt ↵Bo Anderson
gems https://github.com/rubygems/rubygems/commit/11229b16c3