Mariano Martinez Peck <marianop...@...> writes:

> So, it seems to HACK (it forces a fault) this MD fault recover to discover
> inactive classes and other things. Ok, forget that hack for a moment. 
>
> What questions is, what are these faults?  Why a method dictionary can be in
> nil ? How is this produced ? And how is it fixed? 
>
> I saw for example this:
>
> Behaviour>>methodDict
>     methodDict == nil ifTrue: [self recoverFromMDFaultWithTrace].
>     ^ methodDict
>
> But again...how can that be nil ???

I guess your missing link is

    ProtoObject >> #cannotInterpret:

which is executed by the VM whenever you try to send a message to an object
 whose class does not have a method dictionary. Further methods that you should
 look at are

    ClassDescription >> #induceMDFault
    ClassDescription >> #recoverFromMDFault
    ClassDescription >> #recoverFromMDFaultWithTrace

and their senders. Except for the call to #cannotInterpret by the VM, all the
 rest is done in the image (stef got that wrong) and you can go and read the
 code. All in all, it is a highly sophisticated (read *ugly*) hack and I'd say
 an evil use of superpowers.

--AA






_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to