At 09:51 PM 7/3/2002 -0400, Josh Wilmes wrote: >I know there was some talk about this extra "address" parameter recently, >but i'm not sure what the upshot of it is. Right now, tcc is complaining >loudly because the init functions for parrotsub and parrotcoroutine don't >match the init_method_t type in the _vtable structure. > >What's the deal here? I made the PMC init method take an int argument sometime around January, and at the time we agreed it would be useful to have polymorphic constructors. Then it sort of silently got removed. I suppose the patch was done around the same time I commited the sub/coroutine PMCs, which would explain why they got out of sync. Passing an optional arg to the constructor can possibly save us cycles in the long run, for examples, the PMCs that need to know how to size themselves. Unless we do lazy allocation, aggregates usually preallocate at construction time, then resize later. For languages other than Perl that might need a "struct" type, it makes sense to request the correct allocation up front. The size could be bytes, elements, or kilometers. It doesn't need to be just size, as in subs/coroutines. In any case, it wasn't doing any harm, so I'm not sure why it got removed. -MelvinThread Previous | Thread Next