From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of Eliot 
Miranda
Sent: Wednesday, January 24, 2018 10:24
To: Pharo Development List <pharo-dev@lists.pharo.org>
Subject: Re: [Pharo-dev] FFI without the Pharo sources



On Wed, Jan 24, 2018 at 10:21 AM, Eliot Miranda 
<eliot.mira...@gmail.com<mailto:eliot.mira...@gmail.com>> wrote:


On Wed, Jan 24, 2018 at 9:26 AM, 
<vincent.blond...@lamresearch.com<mailto:vincent.blond...@lamresearch.com>> 
wrote:


-----Original Message-----
From: Pharo-dev [mailto:pharo-dev-boun...@lists.pharo.org] On Behalf Of Eliot 
Miranda
Sent: Wednesday, January 24, 2018 8:09
To: Pharo Development List 
<pharo-dev@lists.pharo.org<mailto:pharo-dev@lists.pharo.org>>
Subject: Re: [Pharo-dev] FFI without the Pharo sources

Hi Vincent,

> On Jan 23, 2018, at 4:54 PM, 
> <vincent.blond...@lamresearch.com<mailto:vincent.blond...@lamresearch.com>> 
> <vincent.blond...@lamresearch.com<mailto:vincent.blond...@lamresearch.com>> 
> wrote:
>
> Hi,
>
> I am working to be able to create some standalone apps in Pharo. And for 
> this, I would like to remove of the .sources and .changes. But, by removing 
> them, the args names are reset to arg1, arg2, arg3, ... and the FFI cannot be 
> used anymore.
>
> Does someone (Esteban?) have a solution that I could implement to fix this 
> issue?

One avenue that should be easy to implement would be to modify the compiler to 
save the temporary names as a property of the method.

Hi Eliot,

Ok. That seems the better solution. But you have to do that for only the FFI 
methods?

Right.  It would be very wasteful to do it for everything.  Also, if there is a 
Pragma for the FFI information then an even nicer way to do it would be to add 
a subclass of Pragma, FFIPragma?, and add the tempVars there-in.

Sorry, I don't mean that.  Pgarmas are created when one tries to access a 
method's pragmas; they are ephemeral.  Instead one could add a subclass of 
AdditionalMethodState.  AdditionalMethodState holds the messages for pragmas 
and the properties.  You can use the properties directly; they're a dictionary. 
 But if you added a subclass, AdditionalFFIMethodState?, it could hold the temp 
names in an inst var.

Ok Eliot! I put the args in a variable of the additional state for ffi that is 
created when a ffiCall selector is detected in the method at compilation. I 
think I could finish tomorrow the accessing to the arguments names when the 
sources vanishes.

Thanks!

Vincent



Vincent

>
> Thanks!
>
> Vincent

_,,,^..^,,,_ (phone)




--
_,,,^..^,,,_
best, Eliot



--
_,,,^..^,,,_
best, Eliot

Reply via email to