Getting double semi as sequencer harvested.

stephane ducasse stephane.ducasse at free.fr
Tue Sep 4 18:29:15 UTC 2007


could you tell us more?
Because I would like to see how it works.

Stef

> On 03/09/07, Andreas Raab <andreas.raab at gmx.de> wrote:
>> Igor Stasenko wrote:
>>> In my asm-generator i found a good use of traits - like an extension
>>> mechanism which can be applied to any class to override some basic
>>> behavior. In my case, by adding a trait to some class,  i'm  
>>> overriding
>>> methods which used for compiling instance side methods, so i can
>>> replace and/or extent parser or compiler features only for  
>>> particular
>>> class(es)  without modifying parser/compiler globally.
>>> Also, i don't need to change inheritance chain in classes, where i
>>> adding traits.
>>
>> Sounds interesting. Care to share it?
>>
>
> It's still not finished.
>
> Trait declaration:
>
> Trait named: #AsmCompilerSupport
> 	uses: {}
> 	category: 'Asm-Generator'
>
> And then in some class i simply changing class declaration like  
> following:
>
> Object subclass: #AsmCodeGenerator
> 	uses: AsmCompilerSupport
> 	instanceVariableNames: 'machine methods'
> 	classVariableNames: 'MethodLocations'
> 	poolDictionaries: ''
> 	category: 'Asm-Generator'
>
>
>> Cheers,
>>    - Andreas
>>
>>
>
>
> -- 
> Best regards,
> Igor Stasenko AKA sig.
>
>




More information about the Squeak-dev mailing list