Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Full JIT support for pattern matching #8026

Merged
merged 4 commits into from Nov 30, 2023
Merged

Conversation

headius
Copy link
Member

@headius headius commented Nov 29, 2023

Mostly just missing a few operations in the JIT, but I will throw some optimization work in here too.

@headius headius added this to the JRuby 9.4.6.0 milestone Nov 29, 2023
@headius headius marked this pull request as draft November 29, 2023 03:37
This implements the following operations:

* Integer, to push a native int
* AsFixnum, to construct a RubyFixnum from an int
* ARRAY_LENGTH runtime helper to retrieve array's length as an int
* BIntInstr for branch operations against two ints

To support these, the following logic was added to manage int
local variables on the JVM stack:

* TemporaryIntVariable: similar to the prototype unboxed variables
  but stored boxed in the Object[] temp array in the interpreter.
  The JIT knows to use int when dealing with this type of var.
* int-based temps used by the pattern logic are switched to
  TemporaryIntVariable.

A few minor utility functions are added to SkinnyMethodAdapter,
including the oddly missing icmp_ge.
@enebo enebo merged commit 4907cad into jruby:master Nov 30, 2023
71 of 74 checks passed
@headius headius deleted the pattern_jit branch December 1, 2023 04:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants