Skip to content

JIT coverage fixes#7655

Merged
headius merged 13 commits intojruby:masterfrom
headius:jit_coverage_fixes
Feb 15, 2023
Merged

JIT coverage fixes#7655
headius merged 13 commits intojruby:masterfrom
headius:jit_coverage_fixes

Conversation

@headius
Copy link
Member

@headius headius commented Feb 12, 2023

I'm using coverage data to improve the testing in the compiler general_spec.rb. These are the improvements.

This condition essentially disabled this optimization altogether,
since it would only fire if the receiver was a literal hash. It
should run for all cases of obj["str"].
This brings coverage to 100% for ArrayDerefInvokeSite.
This is not well-optimized but now matches behavior from the
interpreter; if the result of the `to_s` call is not a String,
it should use anyToString on the original object. The `asString`
helper does this, using the given call site (usually refined) to
make the call.
@headius headius added this to the JRuby 9.4.2.0 milestone Feb 12, 2023
Fail branches are not covered yet but they are not currently used
due to the disabling of any caching.
If the string is prefrozen, we don't gain much with this
optimization, so we just leave it as a normal call. Fixes
remaining regressions
@headius headius marked this pull request as ready for review February 15, 2023 15:41
@headius headius merged commit 77c6991 into jruby:master Feb 15, 2023
@headius headius deleted the jit_coverage_fixes branch February 15, 2023 16:09
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.

1 participant