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

PMCs are the thing

2 views
Skip to first unread message

Dan Sugalski

unread,
Dec 3, 2002, 2:54:06 PM12/3/02
to perl6-i...@perl.org
Okay, I've finally stopped waffling. The current PMC structure is now
officially frozen, modulo the odd twiddling to it. As such, I've
added a pmc.ops file and I'm starting to add in ops to read and write
bits of PMCs internals. Stuff for buffers/strings will be along at
some point reasonably soon as well.
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
d...@sidhe.org have teddy bears and even
teddy bears get drunk

Leopold Toetsch

unread,
Dec 4, 2002, 3:35:54 AM12/4/02
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski wrote:

> Okay, I've finally stopped waffling. The current PMC structure is now
> officially frozen, modulo the odd twiddling to it.


Doese odd twiddling include the Buffer/PMC unification?

> ... As such, I've added a

> pmc.ops file and I'm starting to add in ops to read and write bits of
> PMCs internals. Stuff for buffers/strings will be along at some point
> reasonably soon as well.

Via save manipulating ops or just pass over e.g. flags?

leo

Dan Sugalski

unread,
Dec 4, 2002, 10:30:01 AM12/4/02
to Leopold Toetsch, perl6-i...@perl.org
At 9:35 AM +0100 12/4/02, Leopold Toetsch wrote:
>Dan Sugalski wrote:
>
>>Okay, I've finally stopped waffling. The current PMC structure is
>>now officially frozen, modulo the odd twiddling to it.
>
>
>Doese odd twiddling include the Buffer/PMC unification?

Yup. This'd be a good time to do that.

>>... As such, I've added a pmc.ops file and I'm starting to add in
>>ops to read and write bits of PMCs internals. Stuff for
>>buffers/strings will be along at some point reasonably soon as well.
>
>Via save manipulating ops or just pass over e.g. flags?

Everything in the pmc struct will be readable. I think everything'll
be writable, though there are some issues with that. The same with
the ops that act on the buffer stuff, if we don't end up unifying
them. Some of those ops won't be usable in a restricted context, but
that's fine.

Leopold Toetsch

unread,
Dec 4, 2002, 10:49:51 AM12/4/02
to Dan Sugalski, perl6-i...@perl.org
Dan Sugalski wrote:

> At 9:35 AM +0100 12/4/02, Leopold Toetsch wrote:

>> Doese odd twiddling include the Buffer/PMC unification?

> Yup. This'd be a good time to do that.


So the question is, how should the final "Parrot Object" look like. I
did send a test program on Oct. 25th which got warnocked:

Re: [RFC] Buffer/PMC unification, variable/value vtable split, tied scalars

>> Via save manipulating ops or just pass over e.g. flags?

> Everything in the pmc struct will be readable. I think everything'll be
> writable, though there are some issues with that.


I would encapsulate the access into the ops:

set_pmc_internals pmc, what, data

e.g.
set I0, .PmcFflags
set I1, .MemIsMalloced
set_pmc_internals P0, I0, I1

This is expandable and save.
Setting arbitrary flags/fields could do really Bad Things.

leo

0 new messages