Additional parameters execute method

Stefan Marr java at stefan-marr.de
Mon May 11 06:35:04 UTC 2015


Hi:

> On 05 May 2015, at 01:24, Renze Torensma <renzetorensma at gmail.com> wrote:
> 
> I was wondering whether it would be possible to add parameters to the execute method, for example a custom context aside from the VirtualFrame. So for example the execute method would be execute(VirtualFrame frame, Context context) instead of execute(VirtualFrame) like it is in SL and JRuby.

What is the context used for, and is it really something that you need to pass along? In TruffleSOM, I use a static getter that gets me a global ‘context’. A lexical context is directly in the lambda objects that need it via materialized frames. So, all runtime context is somehow explicitly encoded in the argument arrays of calls, and consequently the frame objects. 

Best regards
Stefan


-- 
Stefan Marr
Johannes Kepler Universität Linz
http://stefan-marr.de/research/






More information about the graal-dev mailing list