CallTarget and DirectCallNode in Truffle Languages
eregontp at gmail.com
Thu Jan 19 12:34:04 UTC 2017
DirectCallNode#cloneCallTarget() allows to clone/split a CallTarget so that
its AST can specialize for a given call site.
In Ruby, we force this mechanism for blocks so that the block is
specialized to how a method calls the block.
It can also happens automatically if Truffle decides so when using a
On Thu, Jan 19, 2017 at 12:08 PM, Juan Fumero <juan.fumero at ed.ac.uk> wrote:
> Hi guys,
> I am working with JRuby and R Truffle implementations. I have a few
> questions concerning the callTarget and the directCallNode, most
> probably I do not fully understand concepts here.
> In R, I directly execute the function as follow:
> Running with Graal, the callTarget will be an optimizedCallTarget.
> Till here, everything ok,
> In JRuby the callTarget is not directly executed and instead, a
> directCallNode is used.
> directCallNode.call(frame, args);
> The directCallNode encapsulates the callTarget. However, it is not the
> "original" callTarget I see in the signature in CallBlockNode#callBlock
> This provokes I see a different object optimizedCallTarget when I
> compile ( and I was expecting the same in my implementation).
> The difference is that, directCallNode.getCallTarget() is different to
> 1. Why two different strategies for calling a function (R vs JRuby) ?
> 2. Should not be the same callTarget anyway?
> Thanks a lot
> The University of Edinburgh is a charitable body, registered in
> Scotland, with registration number SC005336.
More information about the graal-dev