Hello Matthias & All:

As you are now improving the defer mechanism how about offering a way in
some instances to eliminate it completely?

One of Edefer important uses is to resolve forward references as AmForth
has no linkage editor (aka, linker). For example:

file1.frt
=========

Edefer truck
:noname  ." no truck engine" cr  ;  is  truck

truck   \ call


file2.frt
=========

: engine ." truck engine installed" cr  ;
' engine is truck

Now, all "truck" calls are served through "(defer)" indirection (as
implemented in words/do-defer.asm). That is fine during development but
if execution speed is an issue with the field version we are better off
replacing "truck" calls with direct "engine" calls.

May I suggest a new defer object, say, "FFdefer" that would be implemented
like "Edefer" except that if a certain global boolean, say, FastForward, is
set then the first "xt_FFdeferfetch" execution will reprogram itself
out by changing the calling code.

Implmenetation is not difficukt but let me claim for now what Ferma (the
mathematicin) once wrote, that it is "too large to fit in the margin" of
this article :-)

Regards, Enoch.






------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Amforth-devel mailing list for http://amforth.sf.net/
Amforth-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/amforth-devel

Reply via email to