>
> I am starting to port some code generating code of mine, and ran  
> into something that (on Dolphin) uses Compiler class>>compile:in:,  
> and the comment suggests that it creates a compiled method object  
> without adding it to the class' method dictionary.  Similar methods  
> in Behavior do the same thing and then add the method to the  
> dictionary.
>
> Are similar things happening in Pharo?

In principle, yes.
In this case:
        -> it's not on the Class side of Compiler, but intance
        -> the selector is compile:in:notifying:ifFail: (with a nice do-your  
own exception handling)

> It looks that way to me, but an expert confirmation or warning would  
> be appreciated.



> Hello Bill, I don't exactly understand what you are asking.
> However, if you want to know if there is methods to compile a source  
> without adding the resulting CompiledMethod to the any class  
> dictionary, the answer is yes, you can. You can do that, for  
> example, by sending the message  
> #compile:classified:notifying:trailer:ifFail:on:do: to any class.

Yes. But if you use the short form available for this in Behavior, e.g.

        compile:
        compile:notifying:

it *does* install the method. not good.


> You can also send messages to compile and add to the  
> methodDictionary, you can browse the class Behavior to find what you  
> want.

And rememeber to read the code...

        Marcus

--
Marcus Denker - http://marcusdenker.de
PLEIAD Lab - Computer Science Department (DCC) - University of Chile


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

Reply via email to