|
Boost : |
From: k.hagan_at_[hidden]
Date: 2001-08-10 03:54:31
"Greg Colvin" <greg_at_[hidden]> wrote...
>
> It seems a compiler for a "fast local stack" machine can simply
> note which local variables have their address used and not keep
> them on the fast stack. Doesn't seem all that different from
> using registers for locals on a machine with register windows.
The big difference is that registers are likely to be restricted
to the built-in types, and those are the types for which the
compiler can see "taking their address" most easily.
If I create an object on the stack and call a member function, a
compiler would normally be unable to prove that the operation didn't
pass an address to another thread. In practice, then, nearly all
objects would have to be placed on the slow stack, which is nearly
always unnecessarily pessimistic.
(Do machines with fast local stacks also have fast local heaps?)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk