| Re: RfD - Enhanced local variable syntax, v4 (long) |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.forth · Group Profile
Author: Stephen PelcStephen Pelc Date: Aug 29, 2008 03:22
On Thu, 28 Aug 2008 13:20:28 -0700 (PDT),
=?ISO-8859-1?Q?Peter_F=E4lth?= wrote:
>Mixing stack comment and locals make no sense to me. As proposed in
>the buffer extension I would have to write
>
>{ | [ 1024 ] BUF1 [ 2 cells ] BUF2 }
>
>to declare 2 local buffers. What does this have to do with a stack
>comment?
Nothing. But allocating temporaries in the same phrase as local
arguments can simplify the compiler and improve performance.
This is less true on hosted x86 systems, but on some RISC CPUs
such as ARM, literals can occupy one to four instructions or
require a memory load.
Stephen
--
Stephen Pelc, stephenXXX@ mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
|