On 10/15/2021 4:39 AM, Aldy Hernandez wrote:
On 10/15/21 2:47 AM, Andrew MacLeod wrote:
On 10/14/21 6:07 PM, Martin Sebor via Gcc-patches wrote:
On 10/9/21 12:47 PM, Aldy Hernandez via Gcc-patches wrote:
We seem to be passing a lot of context around in the strlen code. I
certainly don't want to contribute to more.
Most of the handle_* functions are passing the gsi as well as either
ptr_qry or rvals. That looks a bit messy. May I suggest putting all
of that in the strlen pass object (well, the dom walker object, but we
can rename it to be less dom centric)?
Something like the attached (untested) patch could be the basis for
further cleanups.
Jakub, would this line of work interest you?
You didn't ask me but since no one spoke up against it let me add
some encouragement: this is exactly what I was envisioning and in
line with other such modernization we have been doing elsewhere.
Could you please submit it for review?
Martin
I'm willing to bet he didn't submit it for review because he doesn't
have time this release to polish and track it... (I think the
threader has been quite consuming). Rather, it was offered as a
starting point for someone else who might be interested in continuing
to pursue this work... *everyone* is interested in cleanup work
others do :-)
Exactly. There's a lot of work that could be done in this area, and
I'm trying to avoid the situation with the threaders where what
started as refactoring ended up with me basically owning them ;-).
I wouldn't go that far ;-) I'm still here, just focused on other stuff.
That being said, I there are enough cleanups that are useful on their
own. I've removed all the passing around of GSIs, as well as ptr_qry,
with the exception of anything dealing with the sprintf pass, since it
has a slightly different interface.
You know, it's funny. The 0001 patch looks a lot like what I ended up
doing here and there i when I start cleaning things up. Pull state into
a class, make functions which need the state member functions, repeat
until it works.
This is patch 0001, which I'm formally submitting for inclusion. No
functional changes with this patch. OK for trunk?
I'll ACK this now :-)
Also, I am PINGing patch 0002, which is the strlen pass conversion to
the ranger. As mentioned, this is just a change from an evrp client
to a ranger client. The APIs are exactly the same, and besides, the
evrp analyzer is deprecated and slated for removal. OK for trunk?
I'll defer on this a bit. I've got to step away and may not be back
online tonight. I worry more about the unintended testsuite fallout
here more than anything. Which argues it should go into the tester to
see if there is any such fallout :-)
jeff