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

Support Slice.literal in the interpreter #15531

Conversation

HertzDevil
Copy link
Contributor

This works by adding a specialized cache for the results of pointerof expressions that have the form pointerof($Slice:n.@buffer), which can only arise from literal expansion of Slice.literal calls during the semantic phase.

As with string literals, the contents of slice literals are not truly read-only at the moment (#12422).

@straight-shoota straight-shoota added this to the 1.16.0 milestone Feb 27, 2025
@straight-shoota straight-shoota merged commit 12f5656 into crystal-lang:master Mar 2, 2025
36 checks passed
@HertzDevil HertzDevil deleted the feature/interpreter-slice-literal branch March 3, 2025 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants