All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Loeliger <jdl@jdl.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] DTC: Remove the need for the GLR Parser.
Date: Wed, 24 Oct 2007 09:44:50 +1000	[thread overview]
Message-ID: <20071023234450.GD10595@localhost.localdomain> (raw)
In-Reply-To: <E1IkMI8-0000b3-0U@jdl.com>

On Tue, Oct 23, 2007 at 11:07:39AM -0500, Jon Loeliger wrote:
> So, like, the other day Jon Loeliger mumbled:
> > 
> > > First, a trivial one: I remember leaving this as a right-recursion,
> > > despite the stack-nastiness, because that way the properties end up in
> > > the same order as in the source.  I think that behaviour is worth
> > > preserving, but of course we can do it with left-recursion by changing
> > > chain_property() to add to the end of the list instead of the
> > > beginning.
> > 
> > Understood.  And I wrestled with that as well.  In fact, I even
> > wrote the reverse_properties() function, which I will include,
> > and used it initially.  However, several test failed.  So I
> > removed it, and it all started happily working again.
> 
> I was confused.  It was the version of the code that _did_
> use the property reversal that worked.

Ok.  Except that I think we shouldn't need to have an explicit
reverse_properties().  Just build the list in-order by having
chain_property() append to the end of the list.

It's theoretically expensive, since we have to walk the list each
time, but frankly I don't think we need to worry about dtc performance
until we actually see a single non-contrived tree that takes a
noticeable amount of time to process:  I've never seen one yet.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2007-10-23 23:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-22 21:13 [PATCH] DTC: Remove the need for the GLR Parser Jon Loeliger
2007-10-23  2:54 ` David Gibson
2007-10-23 14:24   ` Jon Loeliger
2007-10-23 14:41     ` Segher Boessenkool
2007-10-23 14:49       ` Jon Loeliger
2007-10-23 23:41         ` David Gibson
2007-10-23 23:37       ` David Gibson
2007-10-23 16:07     ` Jon Loeliger
2007-10-23 23:44       ` David Gibson [this message]
2007-10-24  1:11     ` David Gibson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071023234450.GD10595@localhost.localdomain \
    --to=david@gibson.dropbear.id.au \
    --cc=jdl@jdl.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.