Running jjs
or ScriptEngine#eval
on my JavaScript (https://gist.github.com/also/005fd7c200b20f012e10) crashes with this exception and no more detai
Nashorn tries to split too large scripts/functions into smaller blocks to compile to bytecode to workaround the per method bytecode size limit imposed by JVM. The Nashorn splitter has improved in jdk 1.8.0 update 40 (being developed, not yet released - but early access available from https://jdk8.java.net/download.html. You may want to try that as well.
The current JDK 8u40 is still throwing the bug. Ref the detailed note on:
http://skrishnamachari.wordpress.com/2014/06/18/nashorn-bug/
Also is there a possibility to access the latest Nashorn source to be able to quickly debug through. Atleast find a hack/ validate and have it stick for our use till some final patch is provided.