You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As noir grows we naturally want to add more and more comptime features to it, yet arbitrary features can be difficult to add to the SSA pass and it seems unnecessary to have SSA manage all these extra features which should always be removed at compile-time.
Solution
If we added a partial-evaluation pass to inline functions/loops before SSA and evaluate comptime expressions then it would make several features easier to add in the future: expanding comptime expressions, the mini-evaluator in the name resolver can be removed, and for-loops returning arrays can be implemented.
Alternatives considered
Alternatively, we can add these features all to SSA and deal with them there. Depending on the feature this may be more difficult to add.
The text was updated successfully, but these errors were encountered:
Closing this issue. We've experimented with a partial evaluator somewhat but have elected to keep comptime evaluation in SSA which can better evaluate across functions during inlining.
Problem
As noir grows we naturally want to add more and more
comptime
features to it, yet arbitrary features can be difficult to add to the SSA pass and it seems unnecessary to have SSA manage all these extra features which should always be removed at compile-time.Solution
If we added a partial-evaluation pass to inline functions/loops before SSA and evaluate comptime expressions then it would make several features easier to add in the future: expanding
comptime
expressions, the mini-evaluator in the name resolver can be removed, and for-loops returning arrays can be implemented.Alternatives considered
Alternatively, we can add these features all to SSA and deal with them there. Depending on the feature this may be more difficult to add.
The text was updated successfully, but these errors were encountered: