[perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-10-16 Thread Andrew Whitworth via RT
On Sat Aug 16 02:36:27 2008, [EMAIL PROTECTED] wrote: chromatic wrote: On Thursday 07 August 2008 08:26:19 Bob Rogers wrote: I once suggested a null register allocator that would do this globally, but this is a better idea. The only use case I can think of is debugging, particularly

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-16 Thread Allison Randal
chromatic wrote: On Thursday 07 August 2008 08:26:19 Bob Rogers wrote: I once suggested a null register allocator that would do this globally, but this is a better idea. The only use case I can think of is debugging, particularly of the register allocator, but that's still important. In

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-13 Thread Klaas-Jan Stol
On Fri, Aug 8, 2008 at 12:57 PM, Patrick R. Michaud [EMAIL PROTECTED]wrote: On Thu, Aug 07, 2008 at 10:15:24AM -0400, Will Coleda wrote: Now, if the problem is that the register allocator is broken, then let's fix the register allocator. If :unique_reg is just a workaround because fixing

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-08 Thread Patrick R. Michaud
On Thu, Aug 07, 2008 at 10:15:24AM -0400, Will Coleda wrote: Now, if the problem is that the register allocator is broken, then let's fix the register allocator. If :unique_reg is just a workaround because fixing it is hard, let's document it as deprecated with the expectation that it will be

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Klaas-Jan Stol
On Wed, Aug 6, 2008 at 8: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

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Will Coleda
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

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Jonathan Worthington
Will Coleda wrote: Being allowed to poke inside your caller's register set seems... evil? It's the Parrot equivalent of the .Net CLR allowing you to take references to stuff in caller's stack frames. Can you provide a working PIR example that shows this functionality? It was

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Klaas-Jan Stol
On Thu, Aug 7, 2008 at 12:45 PM, Will Coleda [EMAIL PROTECTED] wrote: 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

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Will Coleda
On Thu, Aug 7, 2008 at 8:10 AM, Klaas-Jan Stol [EMAIL PROTECTED] wrote: On Thu, Aug 7, 2008 at 12:45 PM, Will Coleda [EMAIL PROTECTED] wrote: 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

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Jonathan Worthington
Will Coleda wrote: So, again, do we in parrot want to support the ability to dig into our callers register set and pull out a particular register since we have no way to say which register that is when we're using PIR? Even unique_reg just says 'the register doesn't change', not it's PMC

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Klaas-Jan Stol
On Thu, Aug 7, 2008 at 1:33 PM, Jonathan Worthington [EMAIL PROTECTED]wrote: Will Coleda wrote: So, again, do we in parrot want to support the ability to dig into our callers register set and pull out a particular register since we have no way to say which register that is when we're using

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Jonathan Worthington
Klaas-Jan Stol wrote: I think basically the question remans; is there any way we could do without the :unique_reg? Yes: 1) Add the reference-taking op and register reference PMC to the Parrot core. 2) Make IMCC specially aware of this op so that it never re-uses this register. Thanks,

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread jerry gay
On Thu, Aug 7, 2008 at 5:44 AM, Jonathan Worthington [EMAIL PROTECTED] wrote: Klaas-Jan Stol wrote: I think basically the question remans; is there any way we could do without the :unique_reg? Yes: 1) Add the reference-taking op and register reference PMC to the Parrot core. 2) Make

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Will Coleda
On Thu, Aug 7, 2008 at 10:04 AM, jerry gay [EMAIL PROTECTED] wrote: On Thu, Aug 7, 2008 at 5:44 AM, Jonathan Worthington [EMAIL PROTECTED] wrote: Klaas-Jan Stol wrote: I think basically the question remans; is there any way we could do without the :unique_reg? Yes: 1) Add the

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Bob Rogers
From: jerry gay [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 07:04:24 -0700 . . . also, if i understand satisfy patrick's use case in pge, 3) add the ability to select the register allocator used, or disable it, within a sub. a programmer who knows what he's doing should have

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Will Coleda
On Thu, Aug 7, 2008 at 11:26 AM, Bob Rogers [EMAIL PROTECTED] wrote: From: jerry gay [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 07:04:24 -0700 . . . also, if i understand satisfy patrick's use case in pge, 3) add the ability to select the register allocator used, or disable it,

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread chromatic
On Thursday 07 August 2008 08:26:19 Bob Rogers wrote: I once suggested a null register allocator that would do this globally, but this is a better idea. The only use case I can think of is debugging, particularly of the register allocator, but that's still important. In theory, that's what

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-07 Thread Bob Rogers
From: Will Coleda [EMAIL PROTECTED] Date: Thu, 7 Aug 2008 11:30:34 -0400 On Thu, Aug 7, 2008 at 11:26 AM, Bob Rogers [EMAIL PROTECTED] wrote: I once suggested a null register allocator that would do this globally, but this is a better idea. The only use case I can think of

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Patrick R. Michaud
On Tue, Aug 05, 2008 at 10:51:08AM -0700, Klaas-Jan Stol wrote: From pdd19: The optional C:unique_reg modifier will force the register allocator to associate the identifier with a unique register for the duration of the subroutine. This, however, does not document /why/ you would want

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Will Coleda
On Wed, Aug 6, 2008 at 1:58 PM, Patrick R. Michaud [EMAIL PROTECTED] wrote: On Tue, Aug 05, 2008 at 10:51:08AM -0700, Klaas-Jan Stol wrote: From pdd19: The optional C:unique_reg modifier will force the register allocator to associate the identifier with a unique register for the duration of

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread chromatic
On Wednesday 06 August 2008 11:08:13 Will Coleda wrote: Sometimes the register allocator will re-use a register when it's important that the register not be reused. Can you describe a situation where this occurs that isn't a bug in the register allocator? I can't think of one. -- c

Re: [perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-06 Thread Jonathan Worthington
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. If you're doing that, you need to know that the

[perl #57636] [TODO][PDD19] Document the reason for :unique_reg flag

2008-08-05 Thread via RT
# New Ticket Created by Klaas-Jan Stol # Please include the string: [perl #57636] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57636 From pdd19: The optional C:unique_reg modifier will force the register allocator