Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
writing PMCs (documentation)
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nicholas Clark  
View profile  
 More options May 7 2004, 12:03 pm
Newsgroups: perl.perl6.internals
From: n...@ccl4.org (Nicholas Clark)
Date: Fri, 7 May 2004 17:03:19 +0100
Local: Fri, May 7 2004 12:03 pm
Subject: writing PMCs (documentation)
I'm trying to find documentation on how to write PMCs. I can find lots of
PMCs in the source tree, but I can't seem to find documentation on how to
go about writing them, or what the various fields and flags do.

For example, the string PMC_data occurs in many source files, but as far
as I can tell nowhere in any documentation files, and there aren't many
comments about it in include/parrot/pobj.h

I don't find any documentation saying "if you do this you'll need to do that
in a destructor else you'll leak".

Am I missing something obvious?

Nicholas Clark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Glover  
View profile  
 More options May 7 2004, 12:13 pm
Newsgroups: perl.perl6.internals
From: s...@amnh.org (Simon Glover)
Date: Fri, 7 May 2004 12:13:28 -0400 (EDT)
Local: Fri, May 7 2004 12:13 pm
Subject: Re: writing PMCs (documentation)

On Fri, 7 May 2004, Nicholas Clark wrote:
> I'm trying to find documentation on how to write PMCs. I can find lots of
> PMCs in the source tree, but I can't seem to find documentation on how to
> go about writing them, or what the various fields and flags do.

> For example, the string PMC_data occurs in many source files, but as far
> as I can tell nowhere in any documentation files, and there aren't many
> comments about it in include/parrot/pobj.h

> I don't find any documentation saying "if you do this you'll need to do that
> in a destructor else you'll leak".

> Am I missing something obvious?

 No. The closest we have to something like this is probably the stuff
 written by Mike Scott for the Wiki:

  http://www.vendian.org/parrot/wiki/bin/view.cgi/Main/ParrotDiagramsPMC

 (Well, that plus the comments in pobj.h, which are somewhat opaque.)
 If no-one else volunteers, I'll try to put together something like this,
 as we do need it, but I'm unlikely to have sufficient tuits until the
 end of May :-(

 Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon Glover  
View profile  
 More options May 7 2004, 12:21 pm
Newsgroups: perl.perl6.internals
From: s...@amnh.org (Simon Glover)
Date: Fri, 7 May 2004 12:21:43 -0400 (EDT)
Local: Fri, May 7 2004 12:21 pm
Subject: Re: writing PMCs (documentation)

 Sorry to follow-up to myself, but I've thought of a few other things
 that are probably worth loooking at. First, PDD04 (datatypes) has
 some info on PMC internals, although this is incomplete, and possibly
 out of date...

 Second, when you come to implement the various vtable methods, you should
 probably look at PDD02, which is the closest thing to a comprehensive
 overview that we have, although I don't think it includes anything about
 the recent MMD-related changes that Dan has announced.

 Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Leopold Toetsch  
View profile  
 More options May 7 2004, 1:10 pm
Newsgroups: perl.perl6.internals
From: l...@toetsch.at (Leopold Toetsch)
Date: Fri, 7 May 2004 19:10:23 +0200
Local: Fri, May 7 2004 1:10 pm
Subject: Re: writing PMCs (documentation)

Nicholas Clark <n...@ccl4.org> wrote:
> I'm trying to find documentation on how to write PMCs. I can find lots of
> PMCs in the source tree, but I can't seem to find documentation on how to
> go about writing them, or what the various fields and flags do.

Well, there isn't too much documentation around. The flags are
documented in pobj.h. Existing PMCs should give you some hints.

WRT the fields: there are 2 rules of thumb:

- if the data fit into the UnionVal put it there
  (use appropriate members of the union)
  else you need the PMC_data allocated anyway.
- but if a PMC may point to other PMCs so that possibly deeply nested
  structures may result, it needs the C<pmc_ext> structure (denoted by
  need_ext) in the pmc file.

> I don't find any documentation saying "if you do this you'll need to do that
> in a destructor else you'll leak".

If your PMCs contains other managed objects like Buffers or PMCs, you
have to make sure, that they get marked properly. If you
mem_sys_allocate something during object creation, you need to set the
active_destroy flag and fill the destroy vtable.

> Am I missing something obvious?

No, not AFAIK. I always start writing a new PMC by copying a similar
one.

> Nicholas Clark

leo

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Scott  
View profile  
 More options May 9 2004, 6:57 pm
Newsgroups: perl.perl6.internals
From: michael_sc...@mac.com (Michael Scott)
Date: Sun, 9 May 2004 23:57:39 +0100
Local: Sun, May 9 2004 6:57 pm
Subject: Re: writing PMCs (documentation)
I just moved from Berlin to London and started a new job, so haven't
had time recently for Parrot documentation. Indeed there is plenty to
be done. I should be back on the case in a week or two.

Mike

On 7 May 2004, at 17:13, Simon Glover wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »