[SLOF] [PATCH v2] slof/engine.in: refine +COMP and -COMP by not using COMPILE
Kautuk Consul
kconsul at linux.vnet.ibm.com
Mon Feb 12 20:28:46 AEDT 2024
Hi Segher/Thomas,
On 2024-02-02 00:15:48, Kautuk Consul wrote:
> Use the standard "DOTICK <word> COMPILE," mechanism in +COMP and -COMP
> as is being used by the rest of the compiler.
> Also use "SEMICOLON" instead of "EXIT" to compile into HERE in -COMP
> as that is more informative as it mirrors the way the col() macro defines
> a colon definition.
>
> Signed-off-by: Kautuk Consul <kconsul at linux.vnet.ibm.com>
> ---
> slof/engine.in | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/slof/engine.in b/slof/engine.in
> index 59e82f1..fa4d82e 100644
> --- a/slof/engine.in
> +++ b/slof/engine.in
> @@ -422,8 +422,8 @@ imm(.( LIT(')') PARSE TYPE)
> col(COMPILE R> CELL+ DUP @ COMPILE, >R)
>
> var(THERE 0)
> -col(+COMP STATE @ 1 STATE +! 0BRANCH(1) EXIT HERE THERE ! COMP-BUFFER DOTO HERE COMPILE DOCOL)
> -col(-COMP -1 STATE +! STATE @ 0BRANCH(1) EXIT COMPILE EXIT THERE @ DOTO HERE COMP-BUFFER EXECUTE)
> +col(+COMP STATE @ 1 STATE +! 0BRANCH(1) EXIT HERE THERE ! COMP-BUFFER DOTO HERE DOTICK DOCOL COMPILE,)
> +col(-COMP -1 STATE +! STATE @ 0BRANCH(1) EXIT DOTICK SEMICOLON COMPILE, THERE @ DOTO HERE COMP-BUFFER EXECUTE)
What do you think about the above changes ?
Are there any more changes I could do to this patch ?
Or if you want to reject can you tell me why exactly ?
>
> // Structure words.
> col(RESOLVE-ORIG HERE OVER CELL+ - SWAP !)
> --
> 2.31.1
>
More information about the SLOF
mailing list