Re: Supporting safe managed references

2006-01-25 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 09:19:48AM -0800, Larry Wall wrote: > On Tue, Jan 24, 2006 at 01:04:10PM -, Jonathan Worthington wrote: > : Looking at what Chip said though, it would appear that the much cleaner > : solution I was hoping to find exists and can be found in lex pad stuff, > : which I n

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
"Chip Salzenberg" <[EMAIL PROTECTED]> wrote: On Tue, Jan 24, 2006 at 08:49:55PM -, Jonathan Worthington wrote: "Chip Salzenberg" <[EMAIL PROTECTED]> wrote: >I'd prefer to reuse something in the engine already for those callbacks. >If a lightweight callback mechanism, with parameter, doesn't

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 08:49:55PM -, Jonathan Worthington wrote: > "Chip Salzenberg" <[EMAIL PROTECTED]> wrote: > >I'd prefer to reuse something in the engine already for those callbacks. > >If a lightweight callback mechanism, with parameter, doesn't already > >exist, then you could either us

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
"Chip Salzenberg" <[EMAIL PROTECTED]> wrote: On Tue, Jan 24, 2006 at 03:52:39PM -, Jonathan Worthington wrote: "Chip Salzenberg" <[EMAIL PROTECTED]> wrote: >The trick is to keep references to registers in a way that notices >when the register set is gone, or alternatively, that keeps the >re

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
jeepers I mangled this paragraph On Tue, Jan 24, 2006 at 10:31:50AM -0800, Chip Salzenberg wrote: > What I had in mind, was imitating whatever a closure does to hold onto a > context chain. I would detail that here except it's not on the top of my > brain except (1) the point is the imitation-rat

Re: Supporting safe managed references

2006-01-24 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 03:52:39PM -, Jonathan Worthington wrote: > "Chip Salzenberg" <[EMAIL PROTECTED]> wrote: > >The trick is to keep references to registers in a way that notices > >when the register set is gone, or alternatively, that keeps the > >register set from going away. The latter

Re: Supporting safe managed references

2006-01-24 Thread Larry Wall
On Tue, Jan 24, 2006 at 01:04:10PM -, Jonathan Worthington wrote: : Looking at what Chip said though, it would appear that the much cleaner : solution I was hoping to find exists and can be found in lex pad stuff, : which I need to go stare at for a bit before replying. :-) This is tangenti

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
"Paolo Molaro" <[EMAIL PROTECTED]> wrote: On 01/24/06 Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like They are called managed pointers. Yes. And now I've misled Parrot folks into mis-naming them managed references. D'oh. pointers, but safe.

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
"Chip Salzenberg" <[EMAIL PROTECTED]> wrote: On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like pointers, but safe. [...] Making them work on Parrot is no problem. Making them work without comprimising the s

Re: Supporting safe managed references

2006-01-24 Thread Paolo Molaro
On 01/24/06 Jonathan Worthington wrote: > .NET has these managed reference thingies. They're basically like They are called managed pointers. > pointers, but safe. What makes them safe is that only certain instructions > can create them and the pointer value can't be set directly (we can do t

Re: Supporting safe managed references

2006-01-24 Thread Jonathan Worthington
"Nicholas Clark" <[EMAIL PROTECTED]> wrote: On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: .NET has these managed reference thingies. They're basically like b) Add a v-table flag saying "returning me is forbidden" and checking that on any PMCs that get returned. (H

Re: Supporting safe managed references

2006-01-24 Thread Nicholas Clark
On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: > .NET has these managed reference thingies. They're basically like > b) Add a v-table flag saying "returning me is forbidden" and checking that > on any PMCs that get returned. (However, there are subtle issues. For > e

Re: Supporting safe managed references

2006-01-23 Thread Chip Salzenberg
On Tue, Jan 24, 2006 at 12:11:14AM -, Jonathan Worthington wrote: > .NET has these managed reference thingies. They're basically like > pointers, but safe. [...] > > Making them work on Parrot is no problem. Making them work without > comprimising the safety of the VM is harder. Amongst

Supporting safe managed references

2006-01-23 Thread Jonathan Worthington
Hi, A while back I announced that I was working on a .NET to PIR translator for my final year project at uni. In case you've ever pondered how well it's doing, and you don't read Planet Parrot or my blog, the answer is "pretty well". So far I'm successfully translating: * Parameters * Loca