> I imagine > that these > two methods are handy when you want to debug a primitive in Squeak > before generating C code.
Not really actually. These methods are used by the translator to put the proper cast (else everything appear as 'int' and the C compiler emits warning when you do operation not suitable for int), and to inline methods (for performance reason). I am not expert in compilation, but I would expect a good C compiler to infer whether a method may be inlined or not. Is this inline: directive still necessary? Ideally, these should be set as pragmas I guess. Alexandre > > > Stef > On Dec 24, 2008, at 2:10 PM, Alexandre Bergel wrote: > >> Adding 'Beeper beep' in the body of these two empty methods does not >> produce any sound. This is normal since methods that use these >> methods >> are primitive. Now, we could remove these two methods from Object, >> but >> it would be wise to leave the calls in the body of primitive methods. >> >> Could be a good example for aspects by the way. >> >> Alexandre >> >> >> On 23 Dec 2008, at 19:20, Stéphane Ducasse wrote: >> >>> Hi >>> >>> I'm trying to learn something while reading Object methods. >>> I was wondering whether >>> var: varSymbol declareC: declString and inline: >>> should not be put as Object extension in VMMaker instead of been >>> kept >>> in Object. >>> Now I saw that these methods have senders in the image. >>> Does it mean that part of the code of these senders can be executed >>> when we consider that these two methods are doing nothing? >>> This could be used to debug the code before generating C from it. >>> are my hypotheses correct? >>> >>> Stef >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [email protected] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >> >> -- >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: >> Alexandre Bergel http://www.bergel.eu >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. >> >> >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [email protected] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > > _______________________________________________ > Pharo-project mailing list > [email protected] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;. _______________________________________________ Pharo-project mailing list [email protected] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
