Ahhh..

Some additional debug output shows

dyld: ./parrot Undefined symbols:
_Parrot_tclobject_morph
_Parrot_tclobject_set_pmc

When trying to dynload, e.g. "tclint".

If I look in tclobject.c, I see:

Parrot_tclobject_morph(Parrot_Interp interpreter, PMC* pmc, INTVAL type)

and

Parrot_tclobject_set_pmc(Parrot_Interp interpreter, PMC* pmc, PMC* value)

...

Any clues?

On Sunday, April 11, 2004, at 06:04 PM, Will Coleda wrote:

Well, it helps me understand the process a bit, ja. (Adding info to dynclasses/README in my local copy as I pick it up on list)

I'm still baffled as to why my copy of, say, "TclString" is now compiling happily but failing to be loadable. (as opposed to "tclobject", which *is* loadable, but is not instatiable, and therefore much less interesting. =-)


On Sunday, April 11, 2004, at 03:27 PM, Leopold Toetsch wrote:


Will Coleda <[EMAIL PROTECTED]> wrote:

I don't understand what enum_class_TclString is doing in

Parrot_TclString_class_init(Parrot_Interp interp, int entry)
{
     struct _vtable temp_base_vtable = {
         NULL,   /* package */
         enum_class_TclString,   /* base_type */


If I'm being dynamically generated, and I'm supposed to use the real
values when morphing - what purpose does this serve? is it just a
placeholder?

On compilation of the C file C<enum_class_TclString> is a placeholder. Static classes have these enums in F<include/parrot/core_pmcs.h>, which is autogenerated by Configure.

Dynamically loaded PMCs don't have an entry in that file, so there isn't
any static enum_class_xxx. To make the code compile, a dummy define is
(currently) necessary that makes the compiler happy.


During loading of the dynamic class vtable->base_type is filled with the
correct enum value.


... And if so, why not just automatically gen it with -1 to
avoid this issue?

No problem, patches welcome that include this line for the dynamic case.


... Or is this base_type used elsewhere... in which case
does it have to be unique? across ALL dynamic pmcs? (and, if so, how do
we insure that)

It's unique across the whole parrot process. This is assured by the PMC
registration code. But it of course depends on load order of dynamic
classes.


Hope that this helps a bit.

leo


--
Will "Coke" Coleda will at coleda dot com



--
Will "Coke" Coleda will at coleda dot com




Reply via email to