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

Implement "chilled" Strings #8226

Merged
merged 6 commits into from
May 8, 2024
Merged

Implement "chilled" Strings #8226

merged 6 commits into from
May 8, 2024

Conversation

enebo
Copy link
Member

@enebo enebo commented May 8, 2024

In implementing the feature I took the least complicated route. We get a new Operand and in JIT we just add a second chilled boolean vs trying to shave this to a three-state value.

One uncertainty is that I mark chilled as both frozen and chilled in RubyString flags. I did this because there are lots of isFrozen() checks in our codebase and I would like to fail fast if we find a path where chill should convert to mutable and we miss it. If we were certain we could probably only set chill flag and then check that in frozen?.

In implementing the feature I took the least complicated route.  We
get a new Operand and in JIT we just add a second chilled boolean vs
trying to shave this to a three-state value.

One uncertainty is that I mark chilled as both frozen and chilled in
RubyString flags.  I did this because there are lots of isFrozen() checks
in our codebase and I would like to fail fast if we find a path where
chill should convert to mutable and we miss it.  If we were certain we could
probably only set chill flag and then check that in `frozen?`.
@enebo enebo added this to the JRuby 10.0.0.0 milestone May 8, 2024
@enebo enebo merged commit ac513f5 into jruby:9.5-dev May 8, 2024
26 of 60 checks passed
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

1 participant