summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-09-17Tag `p_lparen` and `p_lbracket` as `tbl`Nobuyoshi Nakada
Remove tagging to the component for each reference.
2023-09-17ripper: Preprocess ripper-dispatchable types onlyNobuyoshi Nakada
Keep the other types, which not having setter macros for ripper.
2023-09-17nd_aid of NODE_OP_ASGN_OR is not used then no need to set ityui-knk
2023-09-16[ruby/irb] Test should not depend on user's irbrc filetomoya ishida
(https://github.com/ruby/irb/pull/714) https://github.com/ruby/irb/commit/02703c46f9
2023-09-16Fix comment for rb_enc_str_new [ci skip]John Hawthorn
2023-09-16Another try to fix build in emscriptenPeter Zhu
malloc_trim is defined in emscripten/emmalloc.h on emscripten.
2023-09-16Fix regression when testing inclusion in unbounded rangesJeremy Evans
Caused by 04a92a6764bf678919cf4b68a27496a39d6b886a. This treats unbounded ranges of arbitrary objects the same as how unbounded string ranges are treated: (..x) === y # (y <=> x) <= 0 (...x) === y # (y <=> x) < 0 (x..) === y # (x <=> y) <= 0 Fixes [Bug #19864]
2023-09-16[ruby/yarp] Fix a possible null pointer deferenceHaldun Bayhantopcu
https://github.com/ruby/yarp/commit/41f601b81b
2023-09-16Add comment markers in empty lines [ci skip]Nobuyoshi Nakada
2023-09-16Align comments [ci skip]Nobuyoshi Nakada
2023-09-16Fix malloc_trim on emscriptenPeter Zhu
``` gc.c:9746:5: error: implicit declaration of function 'malloc_trim' is invalid in C99 [-Werror,-Wimplicit-function-declaration] malloc_trim(0); ^ ``` http://rubyci.s3.amazonaws.com/crossruby/crossruby-master-wasm32_emscripten/log/20230916T104311Z.fail.html.gz
2023-09-16[ruby/irb] Handle Concurrent Sessions and Saving Readline::HISTORYChad Schroeder
(https://github.com/ruby/irb/pull/651) * handle concurrent sessions and saving Readline::HISTORY, fixes https://github.com/ruby/irb/pull/510 * separate tests * don't mutate the HISTORY object on the class * avoid repeated .to_i calls * remove intermediary history array * work with array, fix test comment --------- https://github.com/ruby/irb/commit/1681ada328 Co-authored-by: Stan Lo <stan001212@gmail.com>
2023-09-16[Feature #19839] Fix `Range#overlap?` for empty rangesNobuyoshi Nakada
Empty ranges do not overlap with any range. Regarding benchmarks, PR#8242 is significantly faster in some cases, but one of these two cases is a wrong result. | |ActiveSupport| PR#8242|built-ruby| |:--------------------------|------------:|-------:|---------:| |(2..3).overlap?(1..1) | 7.761M| 15.053M| 32.368M| | | -| 1.94x| 4.17x| |(2..3).overlap?(2..4) | 25.720M| 55.070M| 21.981M| | | 1.17x| 2.51x| -| |(2..3).overlap?(4..5) | 7.616M| 15.048M| 21.730M| | | -| 1.98x| 2.85x| |(2..3).overlap?(2..1) | 25.585M| 56.545M| 32.786M| | | -| 2.21x| 1.28x| |(2..3).overlap?(0..1) | 7.554M| 14.755M| 32.545M| | | -| 1.95x| 4.31x| |(2..3).overlap?(...1) | 6.681M| 5.843M| 32.255M| | | 1.14x| -| 5.52x| |(2...3).overlap?(..2) | 6.676M| 5.817M| 21.572M| | | 1.15x| -| 3.71x| |(2...3).overlap?(3...) | 7.392M| 14.755M| 31.805M| | | -| 2.00x| 4.30x| |(2..3).overlap?('a'..'d') | 3.675M| 3.482M| 17.009M| | | 1.06x| -| 4.89x|
2023-09-16Fix malloc_trim() on wasm32Jean Boussier
``` compiling gc.c gc.c:9746:5: error: implicit declaration of function 'malloc_trim' is invalid in C99 [-Werror,-Wimplicit-function-declaration] malloc_trim(0); ^ 1 error generated. ```
2023-09-16[Feature #19839] Add Range#overlap?Shouichi Kamiya
Add a method that returns true if two range overlap, otherwise false. ``` (0..10).overlap?(5..15) #=> true (0..10).overlap?(20..30) #=> false ```
2023-09-16Optimize Range#bsearch for beginless/endless rangesKouhei Yanagita
On Range#bsearch for endless ranges, we try positions at `begin + 2**i` (i = 0, 1, 2, ...) to find a point that satisfies a given condition. Subsequently, we perform binary searching with the interval `[begin, begin + 2**n]`. However, the interval `[begin + 2**(n-1), begin + 2**n]` is sufficient for binary search because `begin + 2**(n-1)` does not satisfy the condition. The same applies to beginless ranges.
2023-09-16Ignore changed files under removed pathsNobuyoshi Nakada
This fixes the issue commit 43ab2acf8242c580b1ef5d644ea94d48669d4869 "Resurrect gem-specific patterns for sync" described.
2023-09-15YJIT: Avoid creating a vector in get_temp_regs() (#8446)Takashi Kokubun
* YJIT: Avoid creating a vector in get_temp_regs() Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> * Remove unused import --------- Co-authored-by: Alan Wu <alansi.xingwu@shopify.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
2023-09-16Update default gems list at 7f96c9be9e998adb0f9db751bf9cd6 [ci skip]git
2023-09-16[ruby/yarp] Bump to version 0.12.0Kevin Newton
https://github.com/ruby/yarp/commit/c71137377f
2023-09-15Resurrect gem-specific patterns for syncTakashi Kokubun
Yet another partial revert of https://github.com/ruby/ruby/pull/8329, similar to 00f263e6c4. Repro: On ruby/ruby@1be64e34d0, `tool/sync_default_gems.rb yarp 162c2088eec6ec8f0558559e082cd661c18ee02a` should exist successfully, but it doesn't without this gem-specific handling.
2023-09-15[ruby/yarp] Handle missing clauses in case statementKevin Newton
https://github.com/ruby/yarp/commit/1ad7fba5ef
2023-09-15[ruby/yarp] Ensure multi targets are only in valid locationsKevin Newton
https://github.com/ruby/yarp/commit/8bffb8a762
2023-09-15[ruby/yarp] require constant pool capacity to be a power of 2Nathan Froyd
https://github.com/ruby/yarp/commit/dea8d3f29f
2023-09-15YJIT: Fix object movement bug in iseq guard for invokeblockAlan Wu
Since the compile-time iseq used in the guard was not marked and updated during compaction, a runtime value reusing the address could falsely pass the guard. Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
2023-09-15[ruby/yarp] Alnum cannot be %-literal delimitersKevin Newton
https://github.com/ruby/yarp/commit/4ba6d5ca70
2023-09-15[ruby/yarp] Properly handle invalid underscores in number literalsKevin Newton
https://github.com/ruby/yarp/commit/35da3d1a4c
2023-09-15[ruby/yarp] Extract test listener to its own classKevin Newton
https://github.com/ruby/yarp/commit/c8caa997c0
2023-09-15[ruby/yarp] Add node event dispatcherVinicius Stock
This commit changes the node template to create a dispatcher class, which can be used to walk an AST an emit events to all registered listeners https://github.com/ruby/yarp/commit/03a45f85e6 Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
2023-09-15[ruby/yarp] Fix unexpected { after method call with argsJemma Issroff
https://github.com/ruby/yarp/commit/fe279d2d16
2023-09-15[ruby/yarp] Handle unterminated interpolated symbolKevin Newton
https://github.com/ruby/yarp/commit/9222faa1c6
2023-09-15[ruby/yarp] Handle missing terminators in parenthesized expressionKevin Newton
https://github.com/ruby/yarp/commit/a8b54e8ed0
2023-09-15[ruby/yarp] Handle infinite opt terms after missing case predicateKevin Newton
https://github.com/ruby/yarp/commit/d931e258d1
2023-09-15[ruby/yarp] Fix behaviour of locations for commentsAndy Waite
https://github.com/ruby/yarp/commit/b1ced67fba
2023-09-15[rubygems/rubygems] Reduce array allocations and concatenations in IndexMartin Emde
Remove the default nested hash in Index entirely Index#search_all now yields or returns enum since that's what caller needs. https://github.com/rubygems/rubygems/commit/c45ea3bbe2
2023-09-15[rubygems/rubygems] Avoid allocating empty hashes in IndexSamuel Giddins
Since the hashes have a default proc that returns a (new) empty hash, we can avoid allocating those empty hashes when we are only doing lookups. Test from running `bundle update --bundler` against a rails app I have lying around: ``` ==> memprof.after.txt <== Total allocated: 9.71 MB (68282 objects) Total retained: 4.87 MB (33791 objects) ==> memprof.before.txt <== Total allocated: 10.83 MB (100596 objects) Total retained: 5.02 MB (34721 objects) ``` https://github.com/rubygems/rubygems/commit/8f7c9cb23e
2023-09-15[ruby/yarp] Use templated constants for Regexp optionsTim Morgan
https://github.com/ruby/yarp/commit/38e1769c2e
2023-09-15[ruby/yarp] Return Regexp options that match MRI for e, u, s, and nTim Morgan
https://github.com/ruby/yarp/commit/17dbf4ec46
2023-09-15YJIT: Fix and enable the unused_imports warningAlan Wu
2023-09-15[ruby/yarp] Fix string delimiter with "@" confused for embeddedJemma Issroff
variable (https://github.com/ruby/yarp/pull/1521) https://github.com/ruby/yarp/commit/3ec0699622
2023-09-15[DOC] Globals doc (#8445)Burdette Lamar
2023-09-15[rubygems/rubygems] Stop allocating the same settings keys repeatedlySamuel Giddins
Running `bundle update --bundler` on a rails app locally: ``` ==> memprof.after.txt <== Total allocated: 301.90 kB (3794 objects) Total retained: 73.24 kB (698 objects) ==> memprof.before.txt <== Total allocated: 14.47 MB (196378 objects) Total retained: 25.93 kB (202 objects) ``` So for a slight increase in retained memory (all keys are now retained), we go from about 200k allocations in the settings file to under 4k https://github.com/rubygems/rubygems/commit/e64debb6ae
2023-09-15Free all heap pages at shutdownAdam Hess
previously heap_allocated_pages was decremented from heap_page_free causing only half the heap pages to be freed at shutdown
2023-09-15Return line 0 for JIT framesAaron Patterson
Frames pushed by YJIT have an unreliable PC. The PC could be garbage, and if we try to read the line number with a garbage PC, then the program can crash. This commit returns line 0 for programs where there is a `jit_return` function. If `jit_return` has been set then this frame was pushed by the JIT, and we cannot trust the PC. Here is a debugger session for a program that crashed due to a broken PC: ``` (lldb) p ruby_current_vm_ptr->ractor.main_thread->ec->cfp->iseq->body->iseq_encoded (VALUE *) $0 = 0x0000000118a30e00 (lldb) p/x ruby_current_vm_ptr->ractor.main_thread->ec->cfp->pc (const VALUE *) $1 = 0x0000600000b02d00 (lldb) p/x ruby_current_vm_ptr->ractor.main_thread->ec->cfp->jit_return (void *) $2 = 0x000000010622942c ``` You can see the PC is completely out of range, but there is a `jit_return` pointer so we can avoid this crash.
2023-09-15Process.warmup: invoke `malloc_trim` if availableJean Boussier
Similar to releasing free GC pages, releasing free malloc pages reduce the amount of page faults post fork.
2023-09-15[ruby/yarp] Add more tests for implicit hash valuesKevin Newton
https://github.com/ruby/yarp/commit/1ddd74dc11
2023-09-15[ruby/yarp] Add implicit nodes for ommitted hash valuesKevin Newton
https://github.com/ruby/yarp/commit/22130b3491
2023-09-15[ruby/yarp] Keep value for invalid local variable write in treeKevin Newton
https://github.com/ruby/yarp/commit/eaafc829db
2023-09-15[ruby/yarp] Ensure owned constants are marked as shared when overtakenKevin Newton
https://github.com/ruby/yarp/commit/d73f7c9cfa
2023-09-15[ruby/yarp] Disallow numbered parameters in multiple scopesKevin Newton
https://github.com/ruby/yarp/commit/5fd4d3b89a