[SLOF] [PATCH] slof/engine.in: remove the "COMPILE" keyword

Kautuk Consul kconsul at linux.vnet.ibm.com
Tue Jan 23 21:41:26 AEDT 2024


On 2024-01-23 11:00:31, Thomas Huth wrote:
> On 23/01/2024 10.48, Kautuk Consul wrote:
> > On 2024-01-23 10:43:48, Thomas Huth wrote:
> > > On 23/01/2024 10.38, Kautuk Consul wrote:
> > > > "COMPILE" isn't being used anywhere in the Forth code as it is
> > > > currently only being used for "+COMP" and "-COMP" keywords.
> > > > Remove this keyword definition and use the standard "DOTICK <word> COMPILE,"
> > > > mechanism as is being used by the rest of the compiler.
> > > 
> > > "compile" is defined by IEEE 1275, so I doubt that we should remove it?
> > > 
> > >   Thomas
> > Oh yes it is. So we can keep that keyword for maintaining the standard.
> > But can we at least use DOTICK <word> COMPILE, for +COMP and -COMP
> > as that seems to be more efficient than utilizing the return stack in
> > the "COMPILE" does ?
> 
> Sounds like a reasonable optimization to me at a quick glance. But maybe
> Segher could also comment on this, he's more experienced in this SLOF engine
> stuff than anybody else.
So, 2 questions for Segher:
i)	Can we use the standard DOTICK DOCOL COMPILE, and DOTICK SEMICOLON
COMPILE, method for +COMP and -COMP respectively ? That seems to be more
efficient as that doesn't use the return stack.
ii)	Instead of EXIT used in -COMP can we use SEMICOLON instead to
compile into HERE ? That seems to be in line with how the col() macro
is defined and gives better information to the reader of this code that
the compiler is trying to generate the same "DOCOL <forth words> SEMICOLON"
format of defining subroutines.


More information about the SLOF mailing list