Conversation
src/main/java/net/fabricmc/mappingio/adapter/EmptyEntryFilter.java
Outdated
Show resolved
Hide resolved
|
Relying on the visit passes to have the same order seems a bit fragile and the 2 pass approach seems unnecessary? I believe all it'd have to hold onto is a stack to record the src data and a pass-through-grant boolean for the parents and their parents, giving the data retention abilities of recursion to the iterative visitation. If that stack's elements are a mutable class with a few fields to hold a resetable kind, src name, desc, arg index etc it would only have to allocate max(stack_depth) objects for the entire pass. |
4bba892 to
91a6e88
Compare
|
Done. I used the two-pass design first because it's harder to mess things up that way, but with all the tests I added I think the new version I just pushed works just as fine. |
Player3324
left a comment
There was a problem hiding this comment.
I see you ended up flattening it, bu that's fine I think
Thanks, looks good from a cursory glance
…` returned `false`
This is an adapter which filters out elements that effectively don't contain any data. Entries are only forwarded if they contain: