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

The compiler should use frozen strings #554

Closed
etiennebarrie opened this issue Apr 9, 2024 · 1 comment
Closed

The compiler should use frozen strings #554

etiennebarrie opened this issue Apr 9, 2024 · 1 comment

Comments

@etiennebarrie
Copy link
Member

Currently, the parser returns a String created with rb_enc_str_new, which is not frozen. The compiler then turns it into an interned string with rb_fstring, which duplicates it by resizing it because it's not frozen.

We should change the parser to return already frozen strings: #553 (comment)

@etiennebarrie
Copy link
Member Author

ruby#10494
ruby#10504

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

No branches or pull requests

1 participant