[OT] Pepsi how to read _vtable>>_delegated code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[OT] Pepsi how to read _vtable>>_delegated code

Mathieu SUEN
Hi,

I don't realy know where to ask so let ask here and see.

So I want to read of pespsi code and in particular the #_delegated method of the _vtable object.
Do anyone have some pointer on it?

Thanks
        Math

Reply | Threaded
Open this post in threaded view
|

Re: [OT] Pepsi how to read _vtable>>_delegated code

Bert Freudenberg
On Nov 17, 2006, at 22:12 , Mathieu wrote:

> Hi,
>
> I don't realy know where to ask so let ask here and see.
>
> So I want to read of pespsi code and in particular the #_delegated  
> method of the _vtable object.
> Do anyone have some pointer on it?

You mean, apart from the source? What specifically do you want to know?

- Bert -



Reply | Threaded
Open this post in threaded view
|

Re: [OT] Pepsi how to read _vtable>>_delegated code

Mathieu SUEN
In reply to this post by Mathieu SUEN
Ian Piumarta a écrit :

> Hi Math,
>
>> So I want to read of pespsi code and in particular the #_delegated
> method of the _vtable object.
>
> It's a primitive so (assuming you have the pepsi tarball) look in
> lib/libid.c for the function _vtable__delegated().
>
> (This method doesn't have to be a primitive, but I've been too lazy to
> finish writing the reflection example to include it as a non-primitive.
> Look in examples/reflect for lots of other primitives that are
> reimplemented at the user level;  _delegated should be among these, and
> one day I will get round to it.)

Yes that exactly what I search for thanks.
So I have still some remain questions :)

What the #_vtable message return(I have some idea but it's a bit fuzzy)?

reading C generated from source I see a lote of:
struct t_Object {
  struct _vtable *_vtable[0];
};

But it's never use why?

Can you explain me this(Only if you have time and motivation)?:
union t__object
{
  oop _vtable[0];
  _closure_t closure;
  _selector_t selector;
  _assoc_t assoc;
  _vector_t vector;
  _vtable_t vtable;
};

Union it's quite pretty but hard to understand especialy when you don't know type used inside

Anyway what is the semantic of t_ or _t?

Thanks for any of answer that you can give me

        Math

>
> Hope that helps.

Of course :)

>
> Cheers,
> Ian
>