summaryrefslogtreecommitdiff
path: root/.github
AgeCommit message (Collapse)Author
2025-05-12CI: Create proper revision.h on WindowsNobuyoshi Nakada
Notes: Merged: https://github.com/ruby/ruby/pull/13304
2025-05-11Skip mmtk/i686 tests for a whileSatoshi Tagomori
2025-05-10ruby/spec has a minimum of Ruby 3.2 nowBenoit Daloze
2025-05-07Enabled debug mode for CodeQLHiroshi SHIBATA
2025-05-01Removed unused OS_VER variableHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13220
2025-05-01windows-2019 will be EOL at end of June, 2025Hiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13220
2025-04-30Added GCC 15 buildHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13210
2025-04-29Update auto_request_review config for YJIT/ZJIT (#13209)Takashi Kokubun
Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2025-04-29ZJIT: Disable ZJIT instructions when USE_ZJIT is 0 (#13199)Takashi Kokubun
* ZJIT: Disable ZJIT instructions when USE_ZJIT is 0 * Test the order of ZJIT instructions * Add more jobs that disable JITs * Show instruction names in the message Notes: Merged-By: k0kubun <takashikkbn@gmail.com>
2025-04-26Implement Set as a core classJeremy Evans
Set has been an autoloaded standard library since Ruby 3.2. The standard library Set is less efficient than it could be, as it uses Hash for storage, which stores unnecessary values for each key. Implementation details: * Core Set uses a modified version of `st_table`, named `set_table`. than `s/st_/set_/`, the main difference is that the stored records do not have values, making them 1/3 smaller. `st_table_entry` stores `hash`, `key`, and `record` (value), while `set_table_entry` only stores `hash` and `key`. This results in large sets using ~33% less memory compared to stdlib Set. For small sets, core Set uses 12% more memory (160 byte object slot and 64 malloc bytes, while stdlib set uses 40 for Set and 160 for Hash). More memory is used because the set_table is embedded and 72 bytes in the object slot are currently wasted. Hopefully we can make this more efficient and have it stored in an 80 byte object slot in the future. * All methods are implemented as cfuncs, except the pretty_print methods, which were moved to `lib/pp.rb` (which is where the pretty_print methods for other core classes are defined). As is typical for core classes, internal calls call C functions and not Ruby methods. For example, to check if something is a Set, `rb_obj_is_kind_of` is used, instead of calling `is_a?(Set)` on the related object. * Almost all methods use the same algorithm that the pure-Ruby implementation used. The exception is when calling `Set#divide` with a block with 2-arity. The pure-Ruby method used tsort to implement this. I developed an algorithm that only allocates a single intermediate hash and does not need tsort. * The `flatten_merge` protected method is no longer necessary, so it is not implemented (it could be). * Similar to Hash/Array, subclasses of Set are no longer reflected in `inspect` output. * RDoc from stdlib Set was moved to core Set, with minor updates. This includes a comprehensive benchmark suite for all public Set methods. As you would expect, the native version is faster in the vast majority of cases, and multiple times faster in many cases. There are a few cases where it is significantly slower: * Set.new with no arguments (~1.6x) * Set#compare_by_identity for small sets (~1.3x) * Set#clone for small sets (~1.5x) * Set#dup for small sets (~1.7x) These are slower as Set does not currently use the AR table optimization that Hash does, so a new set_table is initialized for each call. I'm not sure it's worth the complexity to have an AR table-like optimization for small sets (for hashes it makes sense, as small hashes are used everywhere in Ruby). The rbs and repl_type_completor bundled gems will need updates to support core Set. The pull request marks them as allowed failures. This passes all set tests with no changes. The following specs needed modification: * Modifying frozen set error message (changed for the better) * `Set#divide` when passed a 2-arity block no longer yields the same object as both the first and second argument (this seems like an issue with the previous implementation). * Set-like objects that override `is_a?` such that `is_a?(Set)` return `true` are no longer treated as Set instances. * `Set.allocate.hash` is no longer the same as `nil.hash` * `Set#join` no longer calls `Set#to_a` (it calls the underlying C function). * `Set#flatten_merge` protected method is not implemented. Previously, `set.rb` added a `SortedSet` autoload, which loads `set/sorted_set.rb`. This replaces the `Set` autoload in `prelude.rb` with a `SortedSet` autoload, but I recommend removing it and `set/sorted_set.rb`. This moves `test/set/test_set.rb` to `test/ruby/test_set.rb`, reflecting that switch to a core class. This does not move the spec files, as I'm not sure how they should be handled. Internally, this uses the st_* types and functions as much as possible, and only adds set_* types and functions as needed. The underlying set_table implementation is stored in st.c, but there is no public C-API for it, nor is there one planned, in order to keep the ability to change the internals going forward. For internal uses of st_table with Qtrue values, those can probably be replaced with set_table. To do that, include internal/set_table.h. To handle symbol visibility (rb_ prefix), internal/set_table.h uses the same macro approach that include/ruby/st.h uses. The Set class (rb_cSet) and all methods are defined in set.c. There isn't currently a C-API for the Set class, though C-API functions can be added as needed going forward. Implements [Feature #21216] Co-authored-by: Jean Boussier <jean.boussier@gmail.com> Co-authored-by: Oliver Nutter <mrnoname1000@riseup.net>
2025-04-25Use OS label for actions/cache. vcpkg only uses same os cacheHiroshi SHIBATA
2025-04-25Use actions/cache instead of vcpkg built-in cache featureHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13176
2025-04-25Revert "Extract windows-11-arm job from windows.yml because it may ignored ↵Hiroshi SHIBATA
vcpkg binary cache for x64-windows" This reverts commit 8e258af5b083a417a8f5e424a2c7d2c4800f8ca2. Notes: Merged: https://github.com/ruby/ruby/pull/13176
2025-04-25Extract windows-11-arm job from windows.yml because it may ignored vcpkg ↵Hiroshi SHIBATA
binary cache for x64-windows Notes: Merged: https://github.com/ruby/ruby/pull/13174
2025-04-24Move VCPKG_BINARY_SOURCES to global environmental variable on workflowHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13166
2025-04-24Added --vcpkg-root for fixing mismatched vcpkg root with scoop versionHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13165
2025-04-24codeql-trap cache is growing over 300MB. We should enable to cleanup ↵Hiroshi SHIBATA
needless cache from actions/cache Notes: Merged: https://github.com/ruby/ruby/pull/13165
2025-04-23Run auto-style.rb only on ruby/rubyNobuyoshi Nakada
`github.event.before` for newly pushed branch is all zero and cannot check out. Notes: Merged: https://github.com/ruby/ruby/pull/13158
2025-04-22Make yjit team auto-review ZJIT PRsMax Bernstein
Notes: Merged: https://github.com/ruby/ruby/pull/13150 Merged-By: k0kubun <takashikkbn@gmail.com>
2025-04-22Test with Windows 2025 serverHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13146
2025-04-21Try to run only working testsHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21nmake check is crashed with windows-11-arm, we need to try test-specHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21windows-11-arm has only C driveHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21set arm64-windows for VCPKG_DEFAULT_TRIPLETHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21Manually generate dummy revision.h fileHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21Don't specify old version of Visual StudioHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21Use vcvarsarm64.bat directly on ARM platformHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21Skip to install BASERUBY from ruby/setup-ruby when windows-11-arm runner is ↵Hiroshi SHIBATA
active Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-21Try to build with windows-11-armHiroshi SHIBATA
Notes: Merged: https://github.com/ruby/ruby/pull/13118
2025-04-18Resurrect concurrency in JIT workflowsTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Drop duplicated workflow jobsTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Rename a reference to an obsoleted variableTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Fix a ubuntu job with --disable-zjitTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Avoid running the same test in multiple workflowsTakashi Kokubun
This workflow is supposed to test that we didn't mess up the interpreter's implementation. We shouldn't need to run test_zjit.rb on this workflow. Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Assert everything is compiled in test_zjit ↵Takashi Kokubun
(https://github.com/Shopify/zjit/pull/40) * Assert everything is compiled in test_zjit * Update a comment on rb_zjit_assert_compiles Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> * Add a comment about assert_compiles * Actually use pipe_fd --------- Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Load Param off of cfp->ep (https://github.com/Shopify/zjit/pull/31)Takashi Kokubun
* Load Param off of cfp->ep * Test with --zjit-call-threshold=1 as well * Fix get_opnd's debug output * Return Mem operand from gen_param * Test both first and second calls * Spell out the namespace for Opnd returns * Update a comment about gen_param * Explain why we take a lock * Fix a typo Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Implement FixnumAdd and stub PatchPoint/GuardType ↵Takashi Kokubun
(https://github.com/Shopify/zjit/pull/30) * Implement FixnumAdd and stub PatchPoint/GuardType Co-authored-by: Max Bernstein <max.bernstein@shopify.com> Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> * Clone Target for arm64 * Use $create instead of use create Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> * Fix misindentation from suggested changes * Drop an unneeded variable for mut * Load operand into a register only if necessary --------- Co-authored-by: Max Bernstein <max.bernstein@shopify.com> Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> Co-authored-by: Alan Wu <XrXr@users.noreply.github.com> Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Fix inconsistent triggers of workflowsTakashi Kokubun
This is another left-over from https://github.com/Shopify/zjit/pull/12. No reason to duplicate jobs for PRs. Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Fix inconsistent workflow settingsTakashi Kokubun
This is a left-over from https://github.com/Shopify/zjit/pull/12. It was supposed to be removed from both workflows in the PR, but this was somehow uncommitted. Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Use rustup to get 1.85.0 since GitHub's image doesn't have itAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Add `result` CI job to enable auto-merge ↵Takashi Kokubun
(https://github.com/Shopify/zjit/pull/12) * Add `result` CI job to enable auto-merge * Avoid triggering duplicated jobs on PRs * Drop cancel-in-progress We don't run as many jobs as ruby/ruby CI. We shouldn't need this here. * Fix a typo * Drop the concurrency group too Similarly, we shouldn't need this in the Shopify/zjit repo Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Implement --zjit-call-thresholdTakashi Kokubun
As a preparation for introducing a profiling layer, we need to be able to raise the threshold to run a few cycles for profiling. Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18btest jobs are now passingTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Ignore btest failures for nowTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Try to fix the BTESTS pathTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Fix BTESTS pathTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Pass BTESTS to make properlyTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Start testing the actual JIT code on CITakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18Drop redundant options in workflowsTakashi Kokubun
Notes: Merged: https://github.com/ruby/ruby/pull/13131
2025-04-18zjit-ubuntu: remove continue on error for make zjit-test. Passes nowAlan Wu
Notes: Merged: https://github.com/ruby/ruby/pull/13131