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

[opt pass] string concatenations to vector pushes #1308

Open
alex-s168 opened this issue Mar 5, 2025 · 0 comments
Open

[opt pass] string concatenations to vector pushes #1308

alex-s168 opened this issue Mar 5, 2025 · 0 comments

Comments

@alex-s168
Copy link
Contributor

alex-s168 commented Mar 5, 2025

Things like:

let x = "a b " + c + "d";
x = " e" + "f";

should be replaced with:

let _x = mk-vector(type(U8),0);
_x = _x.push-all("a b ");
_x = _x.push-all(c);
_x = _x.push-all("d");
_x = _x.push-all(" e");
_x = _x.push-all("f");
let x = _x.move-to(type(String));

blockers:

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