[SLOF] [PATCH v6 1/2] Fix output word
Thomas Huth
thuth at redhat.com
Mon Apr 9 21:54:09 AEST 2018
On 09.04.2018 13:21, Segher Boessenkool wrote:
> 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).
Looks like we've already got serial-key, serial-key? and serial-emit on
both board-js2x and board-qemu, so I assume Laurent could simply use
these here...
Thomas
More information about the SLOF
mailing list