Tail Call Optimization

Stefan Marr java at stefan-marr.de
Tue Jan 13 23:06:58 UTC 2015


Hi Cristian:

> On 13 Jan 2015, at 23:25, Cristian Esquivias <cristian.esquivias at gmail.com> wrote:
> 
> I'm trying to add tail call optimization to my test language and have a
> functional version (no stackoverflows).
> 
> https://github.com/cesquivias/mumbler/commit/3b61f7ccdad7429d2feac6068b0f57edce6a4151

Looking at the diff/code, I think the issue is the call node that you pass back in the exception.
At the point where you handle the exception, you’ll probably need to make that node a constant as part of the AST, by using a dispatch node chain/an inline cache.

Best regards
Stefan


-- 
Stefan Marr
INRIA Lille - Nord Europe
http://stefan-marr.de/research/





More information about the graal-dev mailing list