Sujet : Re: Implementing DOES>: How not to do it (and why not) and how to do it
De : oh2aun (at) *nospam* gmail.com (FFmike)
Groupes : comp.lang.forthDate : 03. Aug 2024, 18:15:23
Autres entêtes
Organisation : novaBBS
Message-ID : <c2588b8c811fd3ae75d3976c3a927fc3@www.novabbs.com>
References : 1
User-Agent : Rocksolid Light
FlashForth.
This post inspired me to remove all the DOLIT DODOES DOCREATE and DOUSER
stuff and to instead
compile a inline code literal and a jump to the common class code.
CREATE was modified to compile one inline literal, a RETURN and a NOP,
the literal points to the data area. Later the RETURN and NOP are
replaced by a JUMP to code after DOES> or in USER.
It is maybe 10 times faster for those code parts on a PIC18FX. Other
architectures still needs
this update to be done.
The PIC18FX, has a nice feature, there is an instruction to push a
literal to the parameter stack
which makes native code literals quite compact. And also all
instructions can index into the
parameter stack making for faster stack operations.
Thanks, Mike