Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: othersrc/usr.bin/dholland-make2



On Sat, Mar 23, 2013 at 10:06:29PM +0000, David Laight wrote:
 > > Improve the toBeMade queue code so it doesn't do bulk array shifts
 > > every time you remove something from the queue head. If this turns out
 > > not to be good enough it can be tuned and/or made into a circular
 > > queue later.
 > > 
 > > (Also, in the long run, the non-tail insertions may go away; they seem
 > > to chiefly be associated with the .ORDER implementation and may not be
 > > needed after the primary graph structure gets some strengthening.)
 > 
 > I was thinking of giving up on the inital attempt at a 'graph'.
 > Instead just remember all the depndencies for each node.
 > 
 > Once the makefile has been parsed (so all the dependencies are linked
 > up) scan all the nodes and add any with no unmade dependencies to a
 > list 'things that can be built'.
 > 
 > After building something, scan through the targets that depend on the
 > now-built item, if that is their last dependency then move on to the
 > list of buildable items.
 > 
 > That will look at the nodes far less often than the hack I had to do
 > to get .ORDER working.

That's pretty much what it does, to the extent I understand it so far.
toBeMade[] is the list of buildable items. I'm going to have to wade
deeper into what's already there to figure out why there's so much
additional elaborate stuff, but I suspect it's largely BS.

After some (maybe a lot of) further cleanup it will probably be
possible to redo .ORDER (and also .WAIT) purely as part of the graph
representation, which should make most of the runtime nasties go away.

Right now though I think it's time to merge back to HEAD.

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index