Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[perl #17811] [PATCH] create pmcs with pmc initializer

0 views
Skip to first unread message

Jonathan Sillito

unread,
Oct 8, 2002, 8:01:53 PM10/8/02
to bugs-bi...@rt.perl.org
# New Ticket Created by Jonathan Sillito
# Please include the string: [perl #17811]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17811 >


I have been playing with classes and instances for parrot. In
the process I found I needed a way to pass more information when
creating new pmcs. So the attached patch adds the op:

new (out PMC, in INT, in PMC)

which calls the vtable function:

void init_pmc (PMC* initializer)

My code that uses this op is not ready to submit, so the patch
does not include tests. However, if this op is wanted, the patch
should be safe to commit (all existing tests pass).

Later.
--
Jonathan Sillito

-- attachment 1 ------------------------------------------------------
url: http://rt.perl.org/rt2/attach/39411/31983/683b0f/new_pmc.patch

new_pmc.patch

Leon Brocard

unread,
Oct 14, 2002, 3:16:56 PM10/14/02
to perl6-i...@perl.org
Jonathan Sillito sent the following bits through the ether:

> I have been playing with classes and instances for parrot. In
> the process I found I needed a way to pass more information when
> creating new pmcs. So the attached patch adds the op:
> new (out PMC, in INT, in PMC)

Oh, I see nobody has replied to this yet. Well, in the past this
feature existed in Parrot, but then was taken out again, presumably
because there was a better way to do it. However, I'm not sure what
that way may be. Can anyone shed some light upon this?

Leon
--
Leon Brocard.............................http://www.astray.com/
scribot.................................http://www.scribot.com/

.... The weirdest thing just happened to me

Leopold Toetsch

unread,
Oct 14, 2002, 4:35:50 PM10/14/02
to Leon Brocard, perl6-i...@perl.org
Leon Brocard wrote:

> Jonathan Sillito sent the following bits through the ether:
>
>
>>I have been playing with classes and instances for parrot. In
>>the process I found I needed a way to pass more information when
>>creating new pmcs. So the attached patch adds the op:
>> new (out PMC, in INT, in PMC)
>>
>
> Oh, I see nobody has replied to this yet. Well, in the past this
> feature existed in Parrot, but then was taken out again, presumably
> because there was a better way to do it. However, I'm not sure what
> that way may be. Can anyone shed some light upon this?


As I wrote WRT array creation, we would need such an op to pass the data
type (and for multiarrays the array dimensions).

> Leon


leo

Josef Hook

unread,
Oct 15, 2002, 6:47:41 AM10/15/02
to Leon Brocard, perl6-i...@perl.org

On Mon, 14 Oct 2002, Leon Brocard wrote:

> Jonathan Sillito sent the following bits through the ether:
>
> > I have been playing with classes and instances for parrot. In
> > the process I found I needed a way to pass more information when
> > creating new pmcs. So the attached patch adds the op:
> > new (out PMC, in INT, in PMC)
>
> Oh, I see nobody has replied to this yet. Well, in the past this
> feature existed in Parrot, but then was taken out again, presumably
> because there was a better way to do it. However, I'm not sure what
> that way may be. Can anyone shed some light upon this?
>

I have submitted a few patches that enables this feature though it
has been forgotten for some reason :-). I believe it is needed because
some pmcs ( not yet applied ) do need to know a few things on init par
example matrices. My patches was 16933 and 16934

/Josef


0 new messages