On Wed, Aug 6, 2008 at 3:30 PM, Jonathan Worthington <[EMAIL PROTECTED]> wrote: > Will Coleda wrote: >> >> Can you describe a situation where this occurs that isn't a bug in the >> register allocator? >> > > Yes. IIRC, it was added when I was working on the .Net bytecode translator, > and it needed to take references to registers in callers.
Being allowed to poke inside your caller's register set seems... evil? Can you provide a working PIR example that shows this functionality? > If you're doing > that, you need to know that the register won't get re-used once the > reference has been taken, or you'll end up with a reference to the wrong > register. Named registers holding things that references were being taken > to, were marked with :unique_reg, to make sure this didn't happen. > > It also, as Pm mentioned, works as a hint to the register allocator not to > bother trying to allocate something that will have life over the entire > compilation unit anyway. > > Jonathan > > -- Will "Coke" Coleda