[SLOF] [PATCH v3] boot: do not use catpad to concatenate strings

Segher Boessenkool segher at kernel.crashing.org
Thu Dec 14 07:23:50 AEDT 2017


On Wed, Dec 13, 2017 at 12:51:24PM +1100, Alexey Kardashevskiy wrote:
> >> Ah, I see... Hm. But why do not we just call parse-load directly, without
> >> evaluate or this really not obvious open coded version of evaluate? :)
> >>
> >> It all looks unnecessary complicated :(
> > 
> > Since parse-load reads from the input device, via the parse area, you
> > need to set up your own, and save / restore it around it.
> > 
> > The CATCH is to ensure the restore happens even if something down in
> > parse-load calls THROW (or ABORT etc.).
> > 
> > I did suggest to have this factored out so you could do something like
> > 
> >   $bootdev ['] parse-load execute-with-input
> 
> 
> Factor out "de-alias do-load" bits from parse-load and call it directly,
> may be?

I think that's a lot of refactoring...  But if you feel up to it, sure,
that should improve the code :-)


Segher


More information about the SLOF mailing list