On 10/06/2015 08:04 AM, Andrew MacLeod wrote:
No commenting on the quality of python code... :-) I was
learning python on the fly.    Im sure some things are QUITE awful.,

Yeah, the general impression is of fairly ad-hoc code. Not sure how
much can be done about this.
they were never intended as general purpose tools, they were developed
over multiple iterations and bugfixing and never properly designed..
they were never originally intended for public submission, so they
suffer...  and I'm not interested in rewriting them yet again
So a little background for Bernd.

The tangled mess that our header files has been makes it extremely difficult to do something introduce a new classes/interfaces to improve the separation of various parts of GCC. Consider the case if we wanted to drop trees from gimple onward by initially wrapping trees in a trivially compatible class then converting files one by one to use the new representation.

We'd want to be able to do the conversion, then ensure ourselves that the old interfaces couldn't sneak in. Getting there required some significant header file deconstruction, then reconstruction.

So Andrew set forth to try and untangle the mess of dependencies, remove unnecessary includes, etc etc. He had the good sense to write some scripts to help :-0

A few months ago as this stage of refactoring header files as nearing completion, I asked Andrew how we were going to prevent things from getting into the sorry shape we were in last year. From that discussion the suggestion that he should polish up his scripts and submit them for inclusion into the contrib/ subdirectory for future reference/use.

Ideally we'd occasionally run those scripts to ensure that we don't muck things up too badly again in the future.

Anyway, that's how we got here. The scripts are just helper tools, but I wouldn't consider them a core part of GCC. Obviously the cleaner and easier to run, the better.

It's interesting that a lot of work done by Andrew has ended up mirroring stuff I'm reading these days in Feathers' book.


Jeff

Reply via email to