refactor(rust): Add AExpr input node iterators#27437
refactor(rust): Add AExpr input node iterators#27437nameexhaustion wants to merge 1 commit intomainfrom
Conversation
|
The uncompressed lib size after this PR is 60.6090 MB. |
|
The uncompressed lib size after this PR is 60.6530 MB. |
|
The uncompressed lib size after this PR is 60.4936 MB. |
|
The uncompressed lib size after this PR is 60.6420 MB. |
|
The uncompressed lib size after this PR is 60.6596 MB. |
|
The uncompressed lib size after this PR is 60.6574 MB. |
|
The uncompressed lib size after this PR is 60.6579 MB. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #27437 +/- ##
==========================================
+ Coverage 80.54% 80.81% +0.27%
==========================================
Files 1842 1844 +2
Lines 254718 256015 +1297
Branches 3181 3177 -4
==========================================
+ Hits 205173 206910 +1737
+ Misses 48722 48283 -439
+ Partials 823 822 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f941c17 to
27158c3
Compare
79a1c8c to
a21b381
Compare
27158c3 to
20cef15
Compare
20cef15 to
5236a2d
Compare
|
The uncompressed lib size after this PR is 61.3423 MB. |
|
I talked about this with Kuba who introduced something similar already, and I'm really not a fan of these complex iterator types with |
The main motivation for this was that I ran into a drawback with that where you aren't able to get (a mutable reference to) the node at a particular index without causing all of the nodes to be extended into a vec. With the iterators this is possible via I also find the iterators end up making some code at the callsite cleaner (e.g. in the PR I'd removed 2 |
Adds
AExpr::nodes_iter(_mut)AExpr::inputs_iter(_mut)- likenodes_iterbut excludes the evaluation exprs of list/eval exprsBefore / after
ae.children_rev(stack)->stack.extend(ae.nodes_iter_name_last())ae.inputs_rev(stack)->stack.extend(ae.inputs_iter_name_last())Other notes
inputs_rev()is inconsistent in that it excludes the eval exprs ofListEvalbut includes the eval exprs ofStructEval. In this PRinputs_iterwill exclude eval exprs of both variants.