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

Prototyping variable-sized PMCs

0 views
Skip to first unread message

Allison Randal

unread,
Sep 27, 2006, 3:54:53 PM9/27/06
to parrot-...@perl.org
Leo and I just chatted on the phone for a bit. I'll summarize here.

We went over two proposals that he put together, one on variable-sized
PMCs and one on creating a shared base class for some of the common PMC
types. (He's checking the proposals into the repository, so you can all
see them. In docs/pdds/clip: pddXX_pmc.pod and pddXX_cstruct.pod.)

In general, I'm okay with the idea of variable-sized PMCs. We're not
talking about resizable PMCs, just the idea that the footprint of a PMC
that holds a single bit can be different than the footprint of a PMC
that holds a more complex data type. It's a step toward closing the gap
between low-level PMCs and the higher-level Parrot Object PMCs. I'm not
sure we've got the right implementation yet, or even sure the benefits
of variable-sized PMCs with outweigh the costs. But, there's enough of a
good idea here to be worth experimenting.

On the shared base class also, I'm not ready to shift our inheritance
hierarchy over, but there are several good ideas in the proposal worth
exploring.

So, I've asked Leo to implement two prototype PMCs. The first is a
C-struct-like PMC that will serve as a good example of both a
variable-sized PMC and of the core ideas in the pddXX_cstruct.pod
proposal. The second is a complex number PMC that will inherit from the
C-struct type, demonstrating some of the benefits of the shared base type.

The prototypes will be implemented as discrete units, so there won't be
any core changes to support them and there won't be any changes to
existing PMCs. This way we can try them out and decide if they're
valuable, and even cycle through several radical changes to the
implementation if we need to, without any impact on the rest of the system.

Allison

0 new messages