Separating parsing and execution

Jaroslav Tulach jaroslav.tulach at oracle.com
Fri Jul 31 17:35:17 UTC 2015


Dear Truffle language writers,
have you ever thought about what Truffle does when the same source code is 
executed multiple times in the same JVM? Did you wonder if that is effective? 
Well, it wasn't, but today we are making the first step to improve it. We now 
ask you to parse the Source first and delay execution for later:

http://lafo.ssw.uni-linz.ac.at/hg/truffle/rev/e7c2d36daf72#l5.21

How does that help? Well, we can cache the CallTarget (and its ASTs) and if 
the same file gets executed twice, we can re-use them. There is just one 
catch: you cannot store single execution data in your nodes persistently. We 
are still working on the best way to store/obtain them. Right now there is 

http://lafo.ssw.uni-linz.ac.at/hg/truffle/rev/e7c2d36daf72#l5.47

but it may not be the best solution. It is likely to change a bit. Anyway if 
you find some time, let us know what you think about our new parsing/execution 
separation.

-jt



More information about the graal-dev mailing list