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

Add a micro-pass to simplify array updates #188

Closed
sonmarcho opened this issue May 17, 2024 · 0 comments
Closed

Add a micro-pass to simplify array updates #188

sonmarcho opened this issue May 17, 2024 · 0 comments
Assignees

Comments

@sonmarcho
Copy link
Member

Consider the following array update:

a[i] = v;

It gets extracted to:

let (_, index_mut_back) ← Array.index_mut_usize U32 16#usize a i
let a1 ← index_mut_back x

It would be good to implement a micro-pass which updates this pattern to something like this:

let a1 ← Array.update U32 16#usize a i x
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