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: | 502 |
Nodes: | 16 (3 / 13) |
Uptime: | 210:57:27 |
Calls: | 9,878 |
Calls today: | 6 |
Files: | 13,791 |
Messages: | 6,205,013 |