modifying a method within the GT inspector

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

modifying a method within the GT inspector

abergel
Hi!

Can I modify the method source code by simply inspecting it?
Consider the following method
C>>foo
        ^ ‘hello’

If I do: (C>>#foo) inspect
when I have an inspector on the compiled method. I can see the source code. But I cannot modify it :-(
How to support a recompilation of the method?

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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: modifying a method within the GT inspector

Tudor Girba-2
Hi,

A CompiledMethod is immutable, so you cannot modify the code. But, you can modify the code of the associated RGMethodDefinition

(Object>>#value) asRingDefinition

:)

Doru

On Mon, Dec 22, 2014 at 12:50 PM, Alexandre Bergel <[hidden email]> wrote:
Hi!

Can I modify the method source code by simply inspecting it?
Consider the following method
C>>foo
        ^ ‘hello’

If I do: (C>>#foo) inspect
when I have an inspector on the compiled method. I can see the source code. But I cannot modify it :-(
How to support a recompilation of the method?

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




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



--

"Every thing has its own flow"

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

Re: modifying a method within the GT inspector

abergel
Excellent!!!!
Works well!

Alexandre


> On Dec 22, 2014, at 1:06 PM, Tudor Girba <[hidden email]> wrote:
>
> Hi,
>
> A CompiledMethod is immutable, so you cannot modify the code. But, you can modify the code of the associated RGMethodDefinition
>
> (Object>>#value) asRingDefinition
>
> :)
>
> Doru
>
> On Mon, Dec 22, 2014 at 12:50 PM, Alexandre Bergel <[hidden email]> wrote:
> Hi!
>
> Can I modify the method source code by simply inspecting it?
> Consider the following method
> C>>foo
>         ^ ‘hello’
>
> If I do: (C>>#foo) inspect
> when I have an inspector on the compiled method. I can see the source code. But I cannot modify it :-(
> How to support a recompilation of the method?
>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
>
> --
> www.tudorgirba.com
>
> "Every thing has its own flow"
> _______________________________________________
> 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