Additional parameters execute method
Chris Seaton
chris.seaton at oracle.com
Tue May 12 14:09:22 UTC 2015
> On 12 May 2015, at 15:05, Renze Torensma <renzetorensma at gmail.com> wrote:
>
> Thanks for your aswer! At first I thought the execute method was something special the compiler knew how to optimize it, but that’s not the case I understand?
A long time ago it used to be the case that methods with a first argument that was a VirtualFrame were special - this is no longer the case.
> And if I understand correctly the execute(VirtualFrame) is called by the CallTarget.call method (line 382 in com.oracle.graal.truffle.OptimizedCallTarget), so I would have to call my execute(VirtualFrame, Context) from the execute(VirtualFrame) for it to be used when a calltarget is called?
Yes - so maybe you could store your Context in your RootNode and then start passing it as a parameter.
I’ve answered your questions in the general, but as other have said for your specific case if this is a kind of global object you may just want to store it in each of your nodes, or maybe just in the root node.
Chris
More information about the graal-dev
mailing list