At 8:05 PM +0100 12/22/03, Elizabeth Mattijsen wrote:In Perl 5, the sharedness of a variable can be determined at run-time. Leo's mentioned that a PMC will never change its address during its lifetime. Can these two requirements be met if there are threaded and unthreaded versions of PMC vtables?Yes. Making a PMC shared can be as simple as swapping out the vtable pointer in the PMC structure--no need to move it around at all. (Or, worst case, turning the PMC into a reference PMC for the actual PMC, whose contents get moved to a new header, which is legal-ish)
It's that last thing I'm worried about. That all thread related things in Parrot are forced to use an extra indirection and consequent performance penalty.
Liz