Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (1 / 5) |
Uptime: | 07:44:05 |
Calls: | 450 |
Calls today: | 1 |
Files: | 1,046 |
Messages: | 91,591 |
On 17/03/2025 5:12 pm, Anton Ertl wrote:
dxf <dxforth@gmail.com> writes:
Would you agree 'nest-sys' are peculiar to colon definitions. That
EXECUTE is a different class of function. It's not doing a 'call'
as such and not leaving anything on the 'return stack'?
That's certainly the case for threaded-code implementations.
For native-code implementations the implementation of EXECUTE is
usually an indirect call; sometimes an indirect tail-call, i.e. a
jump.
...
Yes. Also for optimizing native-code it may be 'xt EXECUTE' itself will
be optimized away. Since the Standard doesn't specify a nest-sys in
relation to EXECUTE we can safely assume there isn't one? If not, when
would it be an issue?
Also for optimizing native-code it may be 'xt EXECUTE' itself will
be optimized away.
Since the Standard doesn't specify a nest-sys in
relation to EXECUTE we can safely assume there isn't one?
dxf <dxforth@gmail.com> writes:
Also for optimizing native-code it may be 'xt EXECUTE' itself will
be optimized away.
Yes:
Gforth (development):
: foo ['] . execute ; ok
see foo
: foo
. ; ok
That's a result of the constant-folding optimization. I wonder how
often it triggers. Probably not much in real-world code.
- anton