MAE/5
M. Anton Ertl (anton@mips.complang.tuwien.ac.at)
The stack-effect ofEXECUTEusually cannot be determined statically. In the context of an optimizing compiler this creates a significant performance problem: no register allocation can be performed across anEXECUTEor across any word that may callEXECUTEdirectly or indirectly.The frequent invocation of
EXECUTEin object-oriented programs makes it important to avoid this cost.
FAST-EXECUTEcore-extInterpretation:
Interpretation semantics for this word are undefined.Compilation: ( u1 u2 u3 u4 -- )
Append the run-time semantics given below to the current definition.Run-time: ( u1*x u3*r xt -- u2*x u4*r )
Remove xt from the stack and perform the semantics identified by it. Other stack effects are due to the wordEXECUTEd. An ambiguous definition exists if xt does not have the stack effect ( u1*x u3*r -- u2*x u4*r )
['] + [ 2 1 0 0 ] FAST-EXECUTE
This word does not introduce new functionality. It can be implemented (without the performance-enhancing effect) on standard systems withWe can therefore wait safely until we have more experience with this word before adopting it.: FAST-EXECUTE 2DROP 2DROP POSTPONE EXECUTE ; IMMEDIATE
none.
- Michael L. Gassanenko:
- I think, the new standard must have a section of "experimental words", as FORTH-83 did, and this proposal can go only to this section.
- Peter Knaggs (pjk@bcs.org.uk):
- I can see very much why you would want this, especially for optimising compilers. The
assumecommand from my stack algebra has the same effect.
- Len Zettel (zettel@acm.org):
- ANS rules do not allow a standard to include an experimental word set. Were this otherwise, we probably would have included one.
At least in the last go-around, when there was considerable pressure felt by the committee to keep the standard small and the glossaries short, priority was given to defining functionality that a user could not provide himself - things that for one reason or another *had* to be provided by the system.
I believe this bias still exists. A word like FAST-EXECUTE, easily built using a colon definition, would have to show very widespread common practice to get considered.