FAMIXInvocation question

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

FAMIXInvocation question

CyrilFerlicot
Hi,

I saw that in FAMIXInvocation we have an instance variable named
"receiverSourceCode". I think this is a bad idea to get variables like
this one because source code should be saved via source anchors. Also,
it is not used in Moose image.

I would like to replace the accessors by:

receiverSourceCode
        ^ self receiver sourceText

receiverSourceCode: aString
        self deprecated: 'The source code of the receiver should not be saved
as a property. Instead access it via the receiver entity.'

Any objection? If I get none I'll do it soon to reduce memory consumption.

--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France


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

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FAMIXInvocation question

Stéphane Ducasse
Why not :)

Now for your deprecation you should add

instead use self receiver sourceText: aString
and probably put this expression after the deprecation. 

BTW
Do we want to have the location of the receiver?
I mean for 

      (self bar) foo: ,….

do we know that it starts 7 and ends 14


On 18 Sep 2017, at 21:45, Cyril Ferlicot D. <[hidden email]> wrote:

Hi,

I saw that in FAMIXInvocation we have an instance variable named
"receiverSourceCode". I think this is a bad idea to get variables like
this one because source code should be saved via source anchors. Also,
it is not used in Moose image.

I would like to replace the accessors by:

receiverSourceCode
^ self receiver sourceText

receiverSourceCode: aString
self deprecated: 'The source code of the receiver should not be saved
as a property. Instead access it via the receiver entity.'

Any objection? If I get none I'll do it soon to reduce memory consumption.

--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France

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

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


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

Re: FAMIXInvocation question

CyrilFerlicot
On Tue, Sep 19, 2017 at 9:19 AM, Stéphane Ducasse
<[hidden email]> wrote:
> Why not :)
>
> Now for your deprecation you should add
>
> instead use self receiver sourceText: aString
> and probably put this expression after the deprecation.
>

It should not use #sourceText: that probably does not exist, but it
should create a SourceAnchor.

> BTW
> Do we want to have the location of the receiver?
> I mean for
>
>       (self bar) foo: ,….
>
> do we know that it starts 7 and ends 14
>

It depends of the parser :) This info can be in the source anchor of
the receiver. If the source anchor is a FAMIXSourceTextAnchor you will
not have the info. If the anchor is a FAMIXFileAnchor or a
FAMIXIndexedFileAnchor you will have more info (if the parser set the
infos).

> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr
> http://www.synectique.eu / http://www.pharo.org
> 03 59 35 87 52
> Assistant: Julie Jonas
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev
>



--
Cyril Ferlicot
https://ferlicot.fr

http://www.synectique.eu
2 rue Jacques Prévert 01,
59650 Villeneuve d'ascq France
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev