At 7:41 PM +0200 10/23/02, Leopold Toetsch wrote:
Possible (feature/architectural) goals for 0.0.9
------------------------------------------------
* PMC cleanup
  - Leo did a huge amount of work on this, but there are a few things left:
  - array.pmc still autocreates something called "PerlUndef"

This is the way it worked earlier too. The problem is (and was) that extending an array just makes room for new PMCs. Allocating all PMCs during extension is not an option (IMHO) this would render sparse arrays to an noop and would be expensive, if these PMCs remain unused. Now, setting the value of an array cell is done by a vtable method like set_integer_native, which requires an PMC to be there, which happens to be a PerlUndef, changing its vtable immediately to the desired type.
It's OK for the array.pmc class to not care about sparseness. I'm fine with us later on adding a sparsearray.pmc.

It'd probably be a good idea for us to have a generic undef.pmc for undefined usage. Dunno if there'll ever be any reason for it to behave differently than perlundef, but it might. For now, perlundef can just subclass undef. (Which means, I suppose, that we just rename perlundef to undef and make a few changes in places that need it)
--
Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk


Reply via email to