Importer fixed :)

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

Importer fixed :)

Stéphane Ducasse
Hi guys

I fixed the smalltalk importer to deal with pool variable.
        - I wrote some tests and fixes for pharo at the shared pools levels.
        - I fixed the importer
               
resolve:
        ….

        object ~~ nil ifTrue: [ ^ object ].
        name asString = 'Smalltalk' ifTrue: [ ^ importer ensureNamespace: Smalltalk ].
       
        "look simple once the rest is working"
        klass := self methodEntity smalltalkClass theNonMetaClass.
        (klass  hasPoolVarNamed: name)
                ifTrue: [pool := klass sharedPoolOfVarNamed: name.
                                ^ self importer ensureClassVarAttribute: name for: pool].
        …

        - I updated the LAN tests
        - I added tests to cover a bit pool variable access.

May be we would like to add to famix the fact that a class uses a sharedPool.
Right now we don't.

Stef
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Importer fixed :)

abergel
Cool!

Alexandre


On 13 Dec 2011, at 18:41, Stéphane Ducasse wrote:

> Hi guys
>
> I fixed the smalltalk importer to deal with pool variable.
> - I wrote some tests and fixes for pharo at the shared pools levels.
> - I fixed the importer
>
> resolve:
> ….
>
> object ~~ nil ifTrue: [ ^ object ].
> name asString = 'Smalltalk' ifTrue: [ ^ importer ensureNamespace: Smalltalk ].
>
> "look simple once the rest is working"
> klass := self methodEntity smalltalkClass theNonMetaClass.
> (klass  hasPoolVarNamed: name)
> ifTrue: [pool := klass sharedPoolOfVarNamed: name.
> ^ self importer ensureClassVarAttribute: name for: pool].
> …
>
> - I updated the LAN tests
> - I added tests to cover a bit pool variable access.
>
> May be we would like to add to famix the fact that a class uses a sharedPool.
> Right now we don't.
>
> Stef
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Importer fixed :)

Tudor Girba-2
Thanks for looking into this.

Regarding your question, perhaps we better add a new type of variable (SharedPool) that is specific to Smalltalk.

Cheers,
Doru


On 13 Dec 2011, at 22:47, Alexandre Bergel wrote:

> Cool!
>
> Alexandre
>
>
> On 13 Dec 2011, at 18:41, Stéphane Ducasse wrote:
>
>> Hi guys
>>
>> I fixed the smalltalk importer to deal with pool variable.
>> - I wrote some tests and fixes for pharo at the shared pools levels.
>> - I fixed the importer
>>
>> resolve:
>> ….
>>
>> object ~~ nil ifTrue: [ ^ object ].
>> name asString = 'Smalltalk' ifTrue: [ ^ importer ensureNamespace: Smalltalk ].
>>
>> "look simple once the rest is working"
>> klass := self methodEntity smalltalkClass theNonMetaClass.
>> (klass  hasPoolVarNamed: name)
>> ifTrue: [pool := klass sharedPoolOfVarNamed: name.
>> ^ self importer ensureClassVarAttribute: name for: pool].
>> …
>>
>> - I updated the LAN tests
>> - I added tests to cover a bit pool variable access.
>>
>> May be we would like to add to famix the fact that a class uses a sharedPool.
>> Right now we don't.
>>
>> Stef
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Next time you see your life passing by, say 'hi' and get to know her."




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev