aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Optimize handle_interrupt(Exception => ..) as a common caseMatthew Draper2023-09-071-22/+55
| | | | | | | | | When interrupt behavior is configured for all possible exceptions using 'Exception', there's no need to iterate the pending exception's ancestors for hash lookups. More significantly, by storing the catch-all timing symbol directly in the mask stack, we can skip allocating the hash we would otherwise need.
* Skip allocation if handle_interrupt arg is already usableMatthew Draper2023-09-071-8/+17
| | | | | | If the supplied hash is already frozen and compare-by-identity, we can use it directly (still checking its contents are valid symbols), without making a new copy.
* YJIT: Decrease SEND_MAX_DEPTH to 5 (#8390)Takashi Kokubun2023-09-071-17/+14
|
* [ruby/yarp] Avoid an extra "stop" parameter to yp_strspn_whitespace_newlinesMike Dalessio2023-09-073-10/+12
| | | | | | | | and use yp_strspn_inline_whitespace instead. Partially reverts implementation details from #1152 https://github.com/ruby/yarp/commit/c8f9f4cfde
* Rewrite Integer#times in Ruby (#8388)Takashi Kokubun2023-09-076-72/+53
|
* [ruby/yarp] Extract error messages into diagnostic.c and use canonical ↵Mike Dalessio2023-09-075-434/+885
| | | | | | | | | | | | | | | | | | message IDs The parser now passes around `yp_diagnostic_id_t` for diagnostic messages instead of character strings, and we rely on the function `diagnostic_message()` to resolve that to a string. In addition, many messages were edited so that the parser expresses coordinate ideas in similar form [1] using consistent voice and typographic conventions. Closes https://github.com/ruby/yarp/pull/1379, and makes progress on #941. [1] Strunk & White rule 19 https://github.com/ruby/yarp/commit/0b6dd85bf1
* Document that thread event hooks are called without the GVLJean Boussier2023-09-071-1/+33
| | | | Except for the `RESUMED` event.
* [YARP] Miscellaneous small bug fixes (#8387)Jemma Issroff2023-09-072-25/+63
|
* [ruby/yarp] remove now-redundant `YP_TOKEN_NOT_PROVIDED_VALUE`Nathan Froyd2023-09-071-2/+0
| | | | https://github.com/ruby/yarp/commit/8f9a3c2345
* [ruby/yarp] use `YP_LOCATION_*_VALUE` macros more consistentlyNathan Froyd2023-09-071-58/+44
| | | | https://github.com/ruby/yarp/commit/bcad93e2fc
* [ruby/yarp] Introduce owned constantsKevin Newton2023-09-077-26/+142
| | | | | | | | | | | | | | | | | | | | | | | | Before this commit, constants in the constant pool were assumed to be slices of the source string. This works in _almost_ all cases. There are times, however, when a string needs to be synthesized. This can occur when passing in locals that need to be scoped through eval, or when generating method names like `foo=`. After this commit, there is a single bit `owned` boolean on constants in the pool that indicates whether or not it is a slice of the source string. If it is not, it is assumed to be allocated memory that should be freed by the constant pool when the constant pool is freed. When serializing, the most significant bit in the location of the contents of the constant indicates whether or not it is owned. When it is, instead of 4 bytes for the source offset and 4 bytes for the length it is instead 4 bytes for the buffer offset and 4 bytes the length. The contents of the owned constants are embedded into the buffer after the constant pool itself. https://github.com/ruby/yarp/commit/461c047365
* Remove function call for String#bytesize (#8389)Aaron Patterson2023-09-072-3/+13
| | | | | | | | | | | | | | | * Remove function call for String#bytesize String size is stored in a consistent location, so we can eliminate the function call. * Update yjit/src/codegen.rs Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com> --------- Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* [YARP] Use the correct field for the name on classes and modulesKevin Newton2023-09-071-2/+2
|
* [ruby/yarp] Constants and def nodesKevin Newton2023-09-07116-0/+366
| | | | https://github.com/ruby/yarp/commit/6b2421ce1b
* [ruby/yarp] Constants on rest parameter nodesKevin Newton2023-09-0740-80/+83
| | | | https://github.com/ruby/yarp/commit/a6fdb8aae9
* [ruby/yarp] Constants on keyword rest parametersKevin Newton2023-09-0722-33/+40
| | | | https://github.com/ruby/yarp/commit/5e1a8fbc54
* [ruby/yarp] Constants on keyword parametersKevin Newton2023-09-0736-48/+94
| | | | https://github.com/ruby/yarp/commit/d2d4f25a23
* [ruby/yarp] Remove name constant from classes/modulesKevin Newton2023-09-0730-89/+5
| | | | https://github.com/ruby/yarp/commit/26105f0b58
* Extract `do_mutex_lock_check_interrupts` to try and fix `ppc64le`. (#8393)Samuel Williams2023-09-081-9/+23
| | | | | | We found some tests were hanging in `do_mutex_lock`, specifically the fiber scheduler autoload test. After much investigation, it may be a code generation bug. Because we didn't change the code, but only extracted it into a separate function, and it appears to fix the problem.
* Update bundled gems list at 2023-09-07git2023-09-072-2/+2
|
* [Bug #19549] Check for variables to be interpolatedNobuyoshi Nakada2023-09-072-16/+7
|
* Reduce number of iterations in `TestFiberScheduler#test_autoload`. (#8391)Samuel Williams2023-09-071-1/+1
| | | | `ppc64le` appears to be struggling with this test due to timeout. Let's see if reducing the number of iterations can help improve the test performance.
* [DOC] Fix up Process::Status#>>Nobuyoshi Nakada2023-09-071-1/+1
|
* [rubygems/rubygems] Reduce excess index creation and mergingMartin Emde2023-09-071-1/+1
| | | | | | | | | | | | | | When @allow_cached is true, @allow_local is always true, therefore, the #installed_specs will always be merged after #cached_specs is called. This makes starting with installed_specs.dup redundant. When #cached_specs is called because @allow_remote is true and @allow_cached is false, then installed_specs will be added after cached_specs based on @allow_local. We never need to add installed_specs here, so don't. https://github.com/rubygems/rubygems/commit/49b38f9750
* [rubygems/rubygems] Improve efficiency of Index#use and #search_allMartin Emde2023-09-072-23/+48
| | | | | | | | | | | | | | | | Rename Index#use(override = true) to #merge! Rename Index @all_specs to @duplicates, it is not actually all specs. @duplicates only holds specs that would have been overridden during a call to Index#use or Index#merge! Reduced dupes in @duplicates by not double adding the new spec to the index and the @duplicates during #merge! Reduce Array creation by using specialized methods when the one result or no results are needed from the search. https://github.com/rubygems/rubygems/commit/47e91125db
* [rubygems/rubygems] Source::Rubygems#fetch_names is only called with ↵Martin Emde2023-09-071-6/+6
| | | | | | override = false https://github.com/rubygems/rubygems/commit/790202691d
* [DOC] Rdoc for Process::Status (#8386)Burdette Lamar2023-09-061-47/+42
|
* [ruby/yarp] Consider source encoding for `slice`Vinicius Stock2023-09-065-6/+18
| | | | | | https://github.com/ruby/yarp/commit/8f59fc27cd Co-authored-by: Kevin Newton <kddnewton@users.noreply.github.com>
* YJIT: Different comment when only setting ec->cfp [ci skip]Alan Wu2023-09-061-1/+2
|
* [ruby/yarp] Fix `Location#end_column`Andy Waite2023-09-062-1/+9
| | | | https://github.com/ruby/yarp/commit/00e4711026
* Fix crash in WeakMap during compactionPeter Zhu2023-09-064-14/+32
| | | | | WeakMap can crash during compaction because the st_insert could allocate memory.
* [ruby/yarp] Constant on block parameter nodeKevin Newton2023-09-0633-76/+119
| | | | https://github.com/ruby/yarp/commit/2cd9a67150
* Try to fix flaky test_warmup_frees_pagesPeter Zhu2023-09-061-0/+3
| | | | | | | | | | | This test sometimes fails with: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2750]: <202> expected but was <203>. ```
* YJIT: Make compiled_* stats available by default (#8379)Takashi Kokubun2023-09-063-18/+30
| | | | | | | | | | | * YJIT: Make compiled_* stats available by default * Update comment about default counters [ci skip] Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> --------- Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
* [ruby/yarp] Constants on classes and modulesKevin Newton2023-09-0630-87/+87
| | | | | | (https://github.com/ruby/yarp/pull/1409) https://github.com/ruby/yarp/commit/0a11ec579f
* [YARP] ClassNode and ModuleNode use name_constant (#8384)Jemma Issroff2023-09-061-2/+2
|
* Fix missing write barrier in iseq instruction listPeter Zhu2023-09-061-17/+36
| | | | | | | | | | | | | | | | | | There's a missing write barrier for operands in the iseq instruction list, which can cause crashes. It can be reproduced when Ruby is compiled with `-DRUBY_DEBUG_ENV=1`. Using the following command: ``` RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=0 RUBY_DEBUG=gc_stress ruby -w --disable=gems -Itool/lib -W0 test.rb ``` The following script crashes: ``` require "test/unit" ```
* [ruby/yarp] Fix assert_raises in YARPKevin Newton2023-09-062-9/+13
| | | | https://github.com/ruby/yarp/commit/8f8f3530aa
* [YARP] Use constant_id lookups where possible (#8374)Jemma Issroff2023-09-061-23/+40
| | | This commit extracts a `yp_constant_id_lookup` method and uses yp_constant_id_lookup where possible
* [ruby/yarp] Temporarily add name_constant to replace name on ↵Kevin Newton2023-09-0630-81/+163
| | | | | | ClassNode/ModuleNode https://github.com/ruby/yarp/commit/8f87686e9c
* [ruby/yarp] Introduce YARP::PatternKevin Newton2023-09-064-0/+373
| | | | https://github.com/ruby/yarp/commit/2a12e9637b
* [ruby/yarp] Add constants and constantsKevin Newton2023-09-0699-411/+478
| | | | https://github.com/ruby/yarp/commit/d7eaa89bc3
* Support freeing the lowest memory address pagePeter Zhu2023-09-061-1/+6
| | | | | | | | | | | This should help fix the following flaky test: ``` 1) Failure: TestProcess#test_warmup_frees_pages [test/ruby/test_process.rb:2751]: <0> expected but was <1>. ```
* [ruby/yarp] Add deprecated aliases of the form YP_NODE_<name>_NODEBenoit Daloze2023-09-061-0/+6
| | | | https://github.com/ruby/yarp/commit/ae1f45ff52
* [ruby/yarp] Rename YP_NODE_*_NODE to YP_*_NODEBenoit Daloze2023-09-066-310/+310
| | | | https://github.com/ruby/yarp/commit/d93b93f342
* Use the test-unit-ruby-core gem for Test::Unit::CoreAssertionsKazuki Yamaguchi2023-09-061-6/+1
| | | | | test/lib/core_assertions.rb and its dependencies are now packaged in the gem test-unit-ruby-core. Let's use it instead.
* [ruby/openssl] test/openssl/test_pkey_ec.rb: refactor tests for ↵Kazuki Yamaguchi2023-09-061-14/+11
| | | | | | | | | | | | | | | | EC.builtin_curves Check that OpenSSL::PKey::EC.builtin_curves returns an array in the expected format. Similarly to OpenSSL::Cipher.ciphers, OpenSSL::PKey::EC.builtin_curves returns a list of known named curves rather than actually usable ones. https://github.com/ruby/openssl/issues/671 found that the list may include unapproved (and thus unusable) curves when the FIPS module is loaded. https://github.com/ruby/openssl/commit/c53cbabe00
* [ruby/openssl] test/openssl/test_ossl.rb: relax assertion for error messagesKazuki Yamaguchi2023-09-061-1/+2
| | | | | | | | | The test case test_error_data utilizes the error message generated by X509V3_EXT_nconf_nid(). The next commit will use X509V3_EXT_nconf(), which generates a slightly different error message. Let's adapt the check to it. https://github.com/ruby/openssl/commit/9cdfa3a4d1
* [ruby/openssl] x509ext: let X509::ExtensionFactory#create_ext take a dotted ↵Michael Richardson2023-09-062-5/+22
| | | | | | | | | | | | | OID string instead of looking of NIDs and then using X509V3_EXT_nconf_nid, instead just pass strings to X509V3_EXT_nconf, which has all the logic for processing dealing with generic extensions also process the oid through ln2nid() to retain compatibility. [rhe: tweaked commit message and added a test case] https://github.com/ruby/openssl/commit/9f15741331
* [ruby/openssl] x509ext: test OpenSSL::X509::ExtensionFactory#create_ext with lnKazuki Yamaguchi2023-09-061-0/+8
| | | | | | | | | | | | OpenSSL::X509::ExtensionFactory#create_ext and #create_extensions accepts both sn (short names) and ln (long names) for registered OIDs. This is different from the behavior of the openssl command-line utility which accepts only sn in openssl.cnf keys. Add a test case to check this. https://github.com/ruby/openssl/commit/91ae46c8d7