-
Notifications
You must be signed in to change notification settings - Fork 219
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
SSA Refactor: Remove tech debt when moving to the SSA refactor #1850
Comments
We should also remove the array of structs -> structs of arrays conversion that happens in monomorphisation. Once the refactor is the default, it is unneeded complexity and it makes serialization order of arguments between Noir and TypeScript less intuitive. From user feedback:
|
enable_slices
tech debt when moving to the SSA refactor
We can also enable 2d arrays once the old SSA is removed |
We should re-evaluate #562 when closing this too |
@kevaundray, #562 should be unrelated since that is a type system bug |
When we make this the default, we would also be merging in the breaking change which would force users to use [T;N] instead of [T], so I think that would issue may be fixed |
This issue should also be reviewed once this is closed, since this can only be closed after dynamic indices: #793 |
Issues that can be fixed after the old ssa is removed: No extra work required:
Some extra work: |
Also adding: #1830 |
Adding #1925 |
This was mentioned here: #1842 |
I've closed the linked issues which are fixed by just using the new SSA. |
All bugs and changes listed here have been completed. |
Problem
PR feat(ssa_refactor)!: Add Slices #1728 implements syntax for slices into Noir. However, as we are moving to the new SSA pass, the PR only implements slices in the new pass while breaking changes were made to the frontend in order to get slices fully working. This means that the
experimental_ssa
flag is now needed not only to determine which SSA to generate but also during compilation.There are features aside slices that touch the frontend but are only implemented using the new SSA. For example after the refactor in PR feat: Refactor Logging to use Brillig foreign calls #1917 we have two different implementations of println. One that uses the old refactor and one that uses Brillig foreign calls. The
experimental_ssa
flag is used again here to determine whether we should use one println or the other.We have unneeded transformations like the array of structs to struct of arrays conversion during monomorphization that can be removed once the old ssa code is removed. Removing this would lead to a more intuitive serialization order when going back and forth between Noir and TypeScript.
Happy Case
The
enable_slices
flag inside of the NodeInterner should be fully removed and all of its conditional checks within the frontend. The array of structs to struct of arrays conversion should also be removed.Alternatives Considered
N/A
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: