summaryrefslogtreecommitdiff
path: root/zjit/src/cruby_methods.rs
AgeCommit message (Collapse)Author
2025-12-12ZJIT: Only optimize `[]` and `[]=` for exact Hash, not Hash subclassesStan Lo
2025-12-12ZJIT: Inline `Hash#[]=`Stan Lo
2025-12-04ZJIT: Inline Kernel#class (#15397)Max Bernstein
We generally know the receiver's class from profile info. I see 600k of these when running lobsters.
2025-12-01ZJIT: Open-code String#getbyteMax Bernstein
Don't call a C function.
2025-12-01ZJIT: Mark String#ascii_only? as leafMax Bernstein
2025-12-01ZJIT: Specialize Integer#>>Max Bernstein
Same as Integer#>>. Also add more strict type checks for both Integer#>> and Integer#<<.
2025-12-01ZJIT: Specialize String#<< with FixnumMax Bernstein
Append a codepoint.
2025-12-01ZJIT: Mark Integer#to_s as returning StringExactMax Bernstein
2025-12-01ZJIT: Standardize method dispatch insns' `recv` field (#15334)Stan Lo
ZJIT: Standardize C call related insn fields - Add `recv` field to `CCall` and `CCallWithFrame` so now all method dispatch related instructions have `recv` field, separate from `args` field. This ensures consistent pointer arithmetic when generating code for these instructions. - Standardize `recv` field's display position in send related instructions.
2025-11-21ZJIT: Don't make GuardNotFrozen consider immediatesMax Bernstein
2025-11-21ZJIT: Specialize Module#=== and Kernel#is_a? into IsAMax Bernstein
2025-11-21ZJIT: Inline Integer#<< for constant rhs (#15258)Max Bernstein
This is good for protoboeuf and other binary parsing
2025-11-21ZJIT: Inline Thread.current (#15272)Max Bernstein
Add `LoadEC` then it's just two `LoadField`.
2025-11-21ZJIT: Inline String#empty? (#15283)Max Bernstein
Don't emit a CCall.
2025-11-18ZJIT: Inline BasicObject#! (#15201)Max Bernstein
2025-11-18ZJIT: Rename the operand of Insn::GuardNotFrozen from val to recvBenoit Daloze
* When writing to an object, the receiver should be checked if it's frozen, not the value, so this avoids an error-prone autocomplete.
2025-11-14ZJIT: Move special Fixnum BOP_OR into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_AND into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_GE into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_LE into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_LT into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_MOD into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_DIV into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_MULT into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_NEQ into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_GT into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_MINUS into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_PLUS into cruby_methodsMax Bernstein
2025-11-14ZJIT: Move special Fixnum BOP_EQ into cruby_methodsMax Bernstein
2025-11-07ZJIT: Specialize String#setbyte for fixnum case (#14927)Aiden Fox Ivey
2025-11-03ZJIT: Inline String#bytesize (#15033)Max Leopold
Inline the `String#bytesize` function and remove the C call.
2025-10-31ZJIT: Fix incorrect elision of call to BasicObject#!=Alan Wu
rb_obj_not_equal() uses rb_funcall(), so it's not `no_gc`, `leaf`, nor `elidable`.
2025-10-30ZJIT: Fix incorrect self.class.respond_to? folding (#15001)Max Bernstein
Right now we have a subtle type system bug around `types::Class`. Until that is resolved, stop marking `Kernel#class` as returning `types::Class`, which fixes Rubocop. Re: https://github.com/Shopify/ruby/issues/850
2025-10-28ZJIT: Specialize Array#pop for no argument case (#14933)Aiden Fox Ivey
Fixes https://github.com/Shopify/ruby/issues/814 This change specializes the case of calling `Array#pop` on a non frozen array with no arguments. `Array#pop` exists in the non-inlined C function list in the ZJIT SFR performance burndown list. If in the future it is helpful, this patch could be extended to support the case where an argument is provided, but this initial work seeks to elide the ruby frame normally pushed in the case of `Array#pop` without an argument.
2025-10-28ZJIT: Add IsBitNotEqual and inline BasicObject#!=Max Bernstein
2025-10-28ZJIT: Optimize Kernel#===Max Bernstein
2025-10-28ZJIT: Add BoxBool and remove CCall from BasicObject#==Max Bernstein
2025-10-28ZJIT: Use FnProperties::default()Max Bernstein
2025-10-28ZJIT: Allow both inlining and annotating propertiesMax Bernstein
2025-10-28ZJIT: Remove redundant annotationMax Bernstein
2025-10-28ZJIT: Inline Kernel#nil? and NilClass#nil?Max Bernstein
We can fully remove the CCall now.
2025-10-27ZJIT: Annotate Kernel#frozen? as returning BoolExactMax Bernstein
2025-10-27ZJIT: Annotate Symbol#to_s and Symbol#name as returning StringExactMax Bernstein
2025-10-27ZJIT: Use .is_empty() for clarityAiden Fox Ivey
2025-10-27ZJIT: Elide unnecessary return statementsAiden Fox Ivey
2025-10-27ZJIT: Remove a duplicated annotation (#14968)Takashi Kokubun
2025-10-24ZJIT: Specialize string length, bytesize, and size (#14928)Jacob
Don't push frame for String#size, String#bytesize, and String#length.
2025-10-23ZJIT: Inline << and push for Array in single arg case (#14926)Aiden Fox Ivey
Fixes https://github.com/Shopify/ruby/issues/813
2025-10-22ZJIT: Inline Kernel#block_given? (#14914)Max Bernstein
Fix https://github.com/Shopify/ruby/issues/832
2025-10-22ZJIT: Inline String#==, String#===Max Bernstein