[SLOF] [PATCH v6 1/2] Fix output word
Segher Boessenkool
segher at kernel.crashing.org
Mon Apr 9 21:21:54 AEST 2018
On Mon, Apr 09, 2018 at 08:15:37AM +0200, Thomas Huth wrote:
> On 08.04.2018 13:05, Segher Boessenkool wrote:
> >> + ELSE
> >> + [ ' emit behavior compile, ]
> >> + THEN
> >> +;
> >
> > What do you expect to be in the emit hook at this point? Could you
> > just use _that_?
>
> The code in slof/fs/term-io.fs is "common" code, i.e. shared between all
> "boards", so there is no 100% generic way to say which token should be
> expected in the emit hook at this point in time. That's why we have the
> detour with [ ' ... behavior compile, ] here. Unless we want to
> hard-code a default name for all boards (ok, we currently only have two
> boards, but still...), I think that line is a nice and short solution to
> the problem.
The usual solution is to just have two hooks, and have one call the
other. So
DEFER debug-emit
...
ELSE debug-emit THEN ;
(or call it early-emit, or whatever makes sense).
Segher
More information about the SLOF
mailing list