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
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 143:34:33 |
Calls: | 10,383 |
Calls today: | 8 |
Files: | 14,054 |
D/L today: |
2 files (1,861K bytes) |
Messages: | 6,417,669 |