91384 Commits

Author SHA1 Message Date
Hiroshi SHIBATA
9e3c120a15 set arm64-windows for VCPKG_DEFAULT_TRIPLET 2025-04-21 12:25:41 +09:00
Hiroshi SHIBATA
a12fe40124 Manually generate dummy revision.h file 2025-04-21 12:25:41 +09:00
Hiroshi SHIBATA
123726ca78 Don't specify old version of Visual Studio 2025-04-21 12:25:41 +09:00
Hiroshi SHIBATA
9408bdb571 Use vcvarsarm64.bat directly on ARM platform 2025-04-21 12:25:41 +09:00
Hiroshi SHIBATA
22d72fed56 Skip to install BASERUBY from ruby/setup-ruby when windows-11-arm runner is active 2025-04-21 12:25:41 +09:00
Hiroshi SHIBATA
c1393bb92b Try to build with windows-11-arm 2025-04-21 12:25:41 +09:00
git
a5037a1aa1 Update default gems list at 6962f3dc29702ffa68f33d889bab70 [ci skip] 2025-04-21 02:41:28 +00:00
Sutou Kouhei
6962f3dc29 [ruby/stringio] Development of 3.1.8 started.
https://github.com/ruby/stringio/commit/14fbdcc02c
2025-04-21 02:40:31 +00:00
git
5fe319f7dc Update default gems list at f8c20cc45d2b1fc63d2a133a49a338 [ci skip] 2025-04-21 02:39:49 +00:00
Sutou Kouhei
f8c20cc45d [ruby/stringio] Development of 3.1.7 started.
https://github.com/ruby/stringio/commit/ee3ee1df31
2025-04-21 02:38:57 +00:00
Kazuki Yamaguchi
93afcfcde3 [ruby/openssl] asn1: check for missing EOC in indefinite length encoding
EOC octets are required at the end of contents of a constructed encoding
that uses the indefinite length form. This cannot be assumed from the
end of the input. Raise an exception when necessary.

https://github.com/ruby/openssl/commit/bc20c13a7c
2025-04-20 07:41:15 +00:00
Nobuyoshi Nakada
c218862d3c
Fix style [ci skip] 2025-04-19 22:02:10 +09:00
Samuel Williams
d6d4e6877c
Tidy up rb_io_fptr_finalize. (#13136) 2025-04-19 19:16:54 +09:00
Jean Boussier
0f25886fac Implement dsize function for fstring_table_type
The fstring table size used to be reported as part of the VM
size, but since it was refactored to be lock-less it was no
longer reported.

Since it's now wrapped by a `T_DATA`, we can implement its
`dsize` function and get a valuable insight into the size
of the table.

```
{"address":"0x100ebff18", "type":"DATA", "shape_id":0, "slot_size":80,
"struct":"VM/fstring_table", "memsize":131176, ...
```
2025-04-19 12:42:14 +09:00
Jean Boussier
52487705d0 Fix style of recent fstring feature 2025-04-19 11:38:22 +09:00
Samuel Williams
20a1c1dc6b
Ensure struct rb_io is passed through to thread.c. (#13134) 2025-04-19 09:55:16 +09:00
Hiroshi SHIBATA
8bf14b048f SVN repository is already retired 2025-04-19 06:33:10 +09:00
Takashi Kokubun
0232c31555 Resurrect concurrency in JIT workflows 2025-04-18 21:54:22 +09:00
Takashi Kokubun
ae3d6a321b Fix yjit-bindgen 2025-04-18 21:53:01 +09:00
Takashi Kokubun
50ae35054b Resurrect yjit_hook 2025-04-18 21:53:01 +09:00
Takashi Kokubun
338b9c2064 Enable YJIT by default 2025-04-18 21:53:01 +09:00
Takashi Kokubun
2ef85c12fb Drop duplicated workflow jobs 2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
dfacd05235 Change mentions of YJIT to ZJIT (https://github.com/Shopify/zjit/pull/113) 2025-04-18 21:53:01 +09:00
Max Bernstein
74f4d8b8a6 Display Snapshot's FrameState using Display (https://github.com/Shopify/zjit/pull/111)
This makes the output a little nicer when doing --zjit-dump-hir=all
2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
490a6d8ef9 Add codegen for NewArray instruction (https://github.com/Shopify/zjit/pull/110)
* Show failing test

* Add second test case

* Add empty NewArray setup

* Update opt_tests and fix NewArray instantiation

* Add code generation for NewArray

* Add NewArray ordering test
2025-04-18 21:53:01 +09:00
Takashi Kokubun
1b95e9c4a0 Implement JIT-to-JIT calls (https://github.com/Shopify/zjit/pull/109)
* Implement JIT-to-JIT calls

* Use a closer dummy address for Arm64

* Revert an obsoleted change

* Revert a few more obsoleted changes

* Fix outdated comments

* Explain PosMarkers for CCall

* s/JIT code/machine code/

* Get rid of ParallelMov
2025-04-18 21:53:01 +09:00
Alan Wu
4f43a09a20 Use GuardType output variable
Helps with readability and threads type info that's there around for
longer. Amend test so `GuardType` doesn't DCE'ed.
2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
164bd8e1a6 Add codegen support for ArrayDup 2025-04-18 21:53:01 +09:00
Max Bernstein
0e766c9014 Mark Guard* as depending on Snapshot in DCE
We need to keep the Snapshot instruction alive.
2025-04-18 21:53:01 +09:00
Max Bernstein
392c492b07 Remove any object specialization in CCall optimization
We don't want to only guard on the class
2025-04-18 21:53:01 +09:00
Max Bernstein
5f69e35be2 Add return_type to FnProperties and CCall 2025-04-18 21:53:01 +09:00
Alan Wu
3e57c4dceb Strength reduce to CCall for sends landing in simple C methods
A new optimization pass. Also:
- Printing for `Insn::CCall`
- Wrap `ID` and add convenience method for printing, replacing calls to rb_id2name()
2025-04-18 21:53:01 +09:00
Max Bernstein
97ba8d9c4d Insert PatchPoint after each Send
In case the callee writes to the caller's locals, we need to be able to
immediately side-exit because our frame's invariants might have been
invalidated.

If in the course of optimization we rewrite the Send, we can choose to
remove the PatchPoint too---but it's not an error to keep it around.
2025-04-18 21:53:01 +09:00
Takashi Kokubun
8b72e07359 Disable ZJIT profiling at call-threshold (https://github.com/Shopify/zjit/pull/99)
* Disable ZJIT profiling at call-threshold

* Stop referencing ZJIT instructions in codegen
2025-04-18 21:53:01 +09:00
Takashi Kokubun
2915806820 Add --zjit-num-profiles option (https://github.com/Shopify/zjit/pull/98)
* Add --zjit-profile-interval option

* Fix min to max

* Avoid rewriting instructions for --zjit-call-threshold=1

* Rename the option to --zjit-num-profiles
2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
31106afdce Add miscellaneous Clippy 'corrections' pt. 2 (https://github.com/Shopify/zjit/pull/95)
* Remove immediately deferenced borrow operators

source: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

* Remove unnecessary cast as i64

Since Const::CInt64 wraps i64, it is unnecessary to cast to i64.

* Remove unnecessary borrow operators

* Beautify assign operation syntax

* Use .is_null() convenience method

* Omit .into() call from u32 to u32

* Use more descriptive std::ptr::null<VALUE>()

In lieu of casting a literal as a type, opt to use the convenience type.

* Use sized integer literal

* Simplify pattern matching to explicit check
2025-04-18 21:53:01 +09:00
Takashi Kokubun
14f0b83d36 Let --zjit-dump-hir dump the input HIR to codegen (https://github.com/Shopify/zjit/pull/96) 2025-04-18 21:53:01 +09:00
Takashi Kokubun
ddef6a7ce4 Split LHS of CMP if it's an immediate (https://github.com/Shopify/zjit/pull/94) 2025-04-18 21:53:01 +09:00
Takashi Kokubun
bfe7da019f Print block param names in asm comment (https://github.com/Shopify/zjit/pull/93) 2025-04-18 21:53:01 +09:00
Max Bernstein
d8a6d43fa4 Fix opt_neq HIR codegen 2025-04-18 21:53:01 +09:00
Max Bernstein
508a0496a5 Use find() in frame_state()
We want to return representatives for the stack and locals.
2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
32374b70fe Add miscellaneous Clippy 'corrections' (https://github.com/Shopify/zjit/pull/92)
* Remove redundant  statements

* Remove .clone() since A64 implements Copy

* Remove .clone() since InsnId implements Copy

.

* Dereference since *const rb_call_data implements Copy

* Remove unnecessary return statement

* Remove unnecessary braces

* Use .is_empty() over length checks

* Remove unnecessary conversion handling

Since i32 can always fit into i64 (the inner type in Opnd::Imm), the conversion is infallibile.

* Use slice notation in lieu of Vec

https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg

* Simplify match statement
2025-04-18 21:53:01 +09:00
Aiden Fox Ivey
ee3949ac3d Improve register alloc and dealloc error messaging (https://github.com/Shopify/zjit/pull/90) 2025-04-18 21:53:01 +09:00
Takashi Kokubun
a9809a6d66 Fix inconsistent indentation 2025-04-18 21:53:01 +09:00
Max Bernstein
e9f6863e82 Make NewArray DCE-able
Initialize with a vector of operands instead of ArraySet instructions.
2025-04-18 21:53:01 +09:00
Max Bernstein
1826c2d23d Add dead code elimination pass
Dead code elimination (DCE) is like garbage collection for your HIR
graph: it removes instructions that are not referenced by the "root
set"---in this case, the instructions marked critical.
2025-04-18 21:53:01 +09:00
Max Bernstein
3e81d18636 Reduce the number of Snapshots emitted
Only emit them on-demand.
2025-04-18 21:53:01 +09:00
Max Bernstein
c0957d4b45 Make Snapshot own FrameState objects 2025-04-18 21:53:01 +09:00
Takashi Kokubun
8a09dd3fb3 Remove an outdated comment
https://github.com/Shopify/zjit/pull/87#discussion_r2025152210
2025-04-18 21:53:01 +09:00
Max Bernstein
ad0d84f0f1 Move get_class_name into cruby 2025-04-18 21:53:01 +09:00