Sujet : Re: Stack vs stackless operation
De : minforth (at) *nospam* gmx.net (minforth)
Groupes : comp.lang.forthDate : 24. Feb 2025, 21:34:25
Autres entêtes
Organisation : novaBBS
Message-ID : <5d52b006538880c3fc512a120c2fb1d0@www.novabbs.com>
References : 1
User-Agent : Rocksolid Light
An optimising Forth compiler does exactly that.
NT/FORTH for example:
: +> rot @ rot @ + swap ! ; ok
see +>
A49E6C 409196 21 C80000 5 normal +>
409196 8B4504 mov eax , [ebp+4h]
409199 8B00 mov eax , [eax]
40919B 8B4D00 mov ecx , [ebp]
40919E 8B09 mov ecx , [ecx]
4091A0 01C8 add eax , ecx
4091A2 8903 mov [ebx] , eax
4091A4 8B5D08 mov ebx , [ebp+8h]
4091A7 8D6D0C lea ebp , [ebp+Ch]
4091AA C3 ret near
ok